--- parser3/src/include/pa_memory.h 2003/03/20 14:19:08 1.1.2.9.2.7 +++ parser3/src/include/pa_memory.h 2003/03/24 10:21:28 1.1.2.9.2.10 @@ -9,7 +9,7 @@ #ifndef PA_MEMORY_H #define PA_MEMORY_H -static const char* IDENT_MEMORY_H="$Date: 2003/03/20 14:19:08 $"; +static const char* IDENT_MEMORY_H="$Date: 2003/03/24 10:21:28 $"; #define PA_DEBUG_REFERENCES @@ -60,6 +60,8 @@ inline char *pa_strdup(const char* auto_ return static_cast(pa_fail_alloc("allocate clean", size)); } +char* pa_format_integer(int value); + inline void pa_free(void *ptr) { GC_FREE(ptr); } @@ -106,6 +108,9 @@ public: static void *malloc_atomic(size_t size) { return pa_malloc_atomic(size); } + static char *strdup(const char* auto_variable_never_null, size_t length=0) { + return pa_strdup(auto_variable_never_null, length); + } static void free(void *ptr) { pa_free(ptr); } @@ -115,7 +120,7 @@ public: private: // disabled from accidental use - /// use malloc instead [GC clears malloc result] + /// use malloc/malloc_atomic instead [GC clears result of those] static void *calloc(size_t size); }; @@ -128,4 +133,5 @@ typedef PA_Allocated PA_Object; #define override #define rethrow throw + #endif