Changeset 38553 for trunk/Ohana/src/libohana/include/ohana_allocate.h
- Timestamp:
- Jun 25, 2015, 10:41:05 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/libohana/include/ohana_allocate.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/libohana/include/ohana_allocate.h
r38441 r38553 1 1 # ifndef OHANA_ALLOCATE 2 2 # define OHANA_ALLOCATE 3 4 # define OHANA_MEMMAGIC (uint32_t) 0xdeadbeef 5 6 typedef struct OhanaMemblock { 7 uint32_t startblock; // endpost marker 8 struct OhanaMemblock *prevBlock; // previously allocated memory 9 struct OhanaMemblock *nextBlock; // next allocated memory 10 size_t size; // size of memory 11 const char *file; // file (re)allocated 12 const char *func; // func (re)allocated 13 int line; // line (re)allocated 14 int freed; // memory has been freed 15 int dummy; // need to put endblock on the endpost 16 uint32_t endblock; // endpost marker 17 } OhanaMemblock; 3 18 4 19 typedef struct { … … 29 44 void real_free (void *in); 30 45 31 # define ohana_memcheck(X) ohana_memcheck_func (X) ;46 # define ohana_memcheck(X) ohana_memcheck_func (X) 32 47 # define ohana_memdump(X) ohana_memdump_func (X); 33 48 … … 56 71 # else /* below: not OHANA_MEMORY */ 57 72 58 # define ohana_memcheck(X) TRUE 73 int ohana_memcheck_noop (int mode); 74 75 # define ohana_memcheck(X) ohana_memcheck_noop (X) 59 76 # define ohana_memdump(X) /* NOP */ 60 77 void real_free (void *in);
Note:
See TracChangeset
for help on using the changeset viewer.
