--- parser3/src/include/pa_memory.h 2003/03/21 13:42:29 1.1.2.9.2.8 +++ parser3/src/include/pa_memory.h 2003/03/24 17:00:49 1.1.2.9.2.11 @@ -9,7 +9,7 @@ #ifndef PA_MEMORY_H #define PA_MEMORY_H -static const char* IDENT_MEMORY_H="$Date: 2003/03/21 13:42:29 $"; +static const char* IDENT_MEMORY_H="$Date: 2003/03/24 17:00:49 $"; #define PA_DEBUG_REFERENCES @@ -48,8 +48,6 @@ inline void *pa_malloc_atomic(size_t siz inline char *pa_strdup(const char* auto_variable_never_null, size_t length=0) { if(!length) length=strlen(auto_variable_never_null); - if(!length) - abort(); size_t size=length+1; if(char *result=static_cast(GC_MALLOC_ATOMIC(size))) { @@ -60,6 +58,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); } @@ -118,7 +118,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); }; @@ -131,4 +131,5 @@ typedef PA_Allocated PA_Object; #define override #define rethrow throw + #endif