diff options
Diffstat (limited to 'core/os/memory_pool_dynamic_prealloc.h')
-rw-r--r-- | core/os/memory_pool_dynamic_prealloc.h | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/core/os/memory_pool_dynamic_prealloc.h b/core/os/memory_pool_dynamic_prealloc.h index 698885561a..3523079bac 100644 --- a/core/os/memory_pool_dynamic_prealloc.h +++ b/core/os/memory_pool_dynamic_prealloc.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -26,35 +26,35 @@ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef MEMORY_POOL_DYNAMIC_PREALLOC_H
-#define MEMORY_POOL_DYNAMIC_PREALLOC_H
-
-#include "pool_allocator.h"
-#include "core/os/memory_pool_dynamic.h"
-
-class MemoryPoolDynamicPrealloc : public MemoryPoolDynamic {
-
- PoolAllocator *pool_alloc;
-
-public:
-
- virtual ID alloc(size_t p_amount,const char* p_description);
- virtual void free(ID p_id);
- virtual Error realloc(ID p_id, size_t p_amount);
- virtual bool is_valid(ID p_id);
- virtual size_t get_size(ID p_id) const;
- virtual const char* get_description(ID p_id) const;
-
- virtual Error lock(ID p_id);
- virtual void * get(ID p_ID);
- virtual Error unlock(ID p_id);
- virtual bool is_locked(ID p_id) const;
-
- virtual size_t get_available_mem() const;
- virtual size_t get_total_usage() const;
-
- MemoryPoolDynamicPrealloc(void * p_mem,int p_size, int p_align = 16, int p_max_entries=PoolAllocator::DEFAULT_MAX_ALLOCS);
- ~MemoryPoolDynamicPrealloc();
-};
-
-#endif // MEMORY_POOL_DYNAMIC_PREALLOC_H
+#ifndef MEMORY_POOL_DYNAMIC_PREALLOC_H +#define MEMORY_POOL_DYNAMIC_PREALLOC_H + +#include "pool_allocator.h" +#include "core/os/memory_pool_dynamic.h" + +class MemoryPoolDynamicPrealloc : public MemoryPoolDynamic { + + PoolAllocator *pool_alloc; + +public: + + virtual ID alloc(size_t p_amount,const char* p_description); + virtual void free(ID p_id); + virtual Error realloc(ID p_id, size_t p_amount); + virtual bool is_valid(ID p_id); + virtual size_t get_size(ID p_id) const; + virtual const char* get_description(ID p_id) const; + + virtual Error lock(ID p_id); + virtual void * get(ID p_ID); + virtual Error unlock(ID p_id); + virtual bool is_locked(ID p_id) const; + + virtual size_t get_available_mem() const; + virtual size_t get_total_usage() const; + + MemoryPoolDynamicPrealloc(void * p_mem,int p_size, int p_align = 16, int p_max_entries=PoolAllocator::DEFAULT_MAX_ALLOCS); + ~MemoryPoolDynamicPrealloc(); +}; + +#endif // MEMORY_POOL_DYNAMIC_PREALLOC_H |