memoryArena.cpp 484 B

1234567891011121314151617
  1. #include <memoryArena/memoryArena.h>
  2. #include <malloc.h>
  3. //todo remove
  4. void pika::memory::MemoryArena::allocateStaticMemory(const ContainerInformation &containerInfo)
  5. {
  6. containerStructMemory.size = containerInfo.containerStructBaseSize;
  7. containerStructMemory.block = malloc(containerInfo.containerStructBaseSize);
  8. }
  9. void pika::memory::MemoryArena::dealocateStaticMemory()
  10. {
  11. containerStructMemory.size = 0;
  12. free(containerStructMemory.block);
  13. containerStructMemory.block = 0;
  14. }