10 #ifndef BSTREAM_MEMORY 11 #define BSTREAM_MEMORY 15 # define BSTREAM_NEW(type) NEW(type) 16 # define BSTREAM_ALLOC(p, type) ALLOC(p, type) 17 # define BSTREAM_ALLOC_ARRAY(p, count, type) ALLOC_ARRAY(p, count, type) 18 # define BSTREAM_FREE(p, type) do { \ 22 # define BSTREAM_FREE_ARRAY(p, count, type) do { \ 24 FREE_ARRAY(p, count, type); \ 26 # define BSTREAM_NEW_VLIST(p) p = new_vlist(DEFAULT_MEMORY_POOL()) 27 # define BSTREAM_NEW_VHASH(p, size) p = new_vhash(size, DEFAULT_MEMORY_POOL()) 29 # define BSTREAM_NEW(type) new type 30 # define BSTREAM_ALLOC(p, type) p = new type 31 # define BSTREAM_ALLOC_ARRAY(p, count, type) p = new type [count] 32 # define BSTREAM_FREE(p, type) delete p 33 # define BSTREAM_FREE_ARRAY(p, count, type) delete [] p 34 # define BSTREAM_NEW_VLIST(p) p = new_vlist(malloc, free) 35 # define BSTREAM_NEW_VHASH(p, size) p = new_vhash(size, malloc, free) 38 # define BSTREAM_DELETE(p) delete p 40 #endif // BSTREAM_MEMORY