Annotation of parser3/src/doc/memory.dox, revision 1.4
1.3 paf 1: /** @page Memory Memory: work with memory
1.2 paf 2:
1.3 paf 3: Parser in it's work with memory relies on garbage collection. See http://www.hpl.hp.com/personal/Hans_Boehm/gc
1.2 paf 4:
1.3 paf 5: Work with memory goes like this:
1.4 ! moko 6: all allocations are in the end get to pa_malloc pa_malloc_atomic, pa_realloc, pa_free functions;
! 7: For C++ corresponding new operators are overloaded. To allocate a memory in C++ style one should specify,
! 8: will the block contains pointers, use new when "it will" or new(PointerFreeGC) when "it will not".
1.2 paf 9:
1.4 ! moko 10: For convinient memory allocation for objects there is root class PA_Object,
! 11: overriding new operator and check usage for malloc/malloc_atomic/realloc/free.
1.3 paf 12: It is recommended, where it is possible, to allocate memory in C++ style [using new operator],
13: exception can be made for a case where realloc is needed:
14: on many platforms new-operator changes the pointer, returned by new-operator-implementation allocator.
15: that is new+realloc / realloc+delete are not allowed.
1.2 paf 16: */
E-mail: