Memory.hpp
Go to the documentation of this file.
1 // Copyright (c) 2013 by Wayne C. Gramlich. All rights reserved.
2 
3 #if !defined(MEMORY_H_INCLUDED)
4 #define MEMORY_H_INCLUDED 1
5 
20 
21 #include "String.hpp"
22 
23 #define Memory__new(Type, from) \
24  ((Type)Memory__allocate(sizeof(*((Type)0)), from))
25 
27 typedef void *Memory;
28 
29 // Extern declarations:
30 
31 #if defined(MEMORY_LEAK_CHECK)
32  extern void Memory__leak_check(Memory memory);
33  extern void Memory__leak_found(Memory memory);
34 #endif // defined(MEMORY_LEAK_CHECK)
35 
36 extern Memory Memory__allocate(unsigned int bytes, String_Const from);
37 extern void Memory__free(Memory memory);
38 
39 #endif // !defined(MEMORY_H_INCLUDED)
40 
void Memory__free(Memory memory)
Releases the storage associated with memory.
Definition: Memory.cpp:60
void * Memory
Memory is a pointer to memory.
Definition: Memory.hpp:27
const char * String_Const
Definition: String.hpp:9
Memory Memory__allocate(unsigned int bytes, String_Const from)
Allocates bytes of memory and returns a pointer to it.
Definition: Memory.cpp:22


fiducial_lib
Author(s): Wayne Gramlich
autogenerated on Thu Dec 28 2017 04:06:53