ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/util.h
(Generate patch)

Comparing deliantra/server/include/util.h (file contents):
Revision 1.11 by root, Tue Sep 12 20:55:40 2006 UTC vs.
Revision 1.12 by root, Tue Sep 12 21:10:32 2006 UTC

39 { 39 {
40 g_slice_free1 (s, p); 40 g_slice_free1 (s, p);
41 } 41 }
42}; 42};
43 43
44void throw_bad_alloc () throw (std::bad_alloc); 44// strictly the same as g_slice_alloc, but never returns 0
45
46void *alloc (int s) throw (std::bad_alloc); 45void *alloc (int s) throw (std::bad_alloc);
46// for symmetry
47void dealloc (void *p, int s) throw (); 47inline void dealloc (void *p, int s) throw ()
48{
49 g_slice_free1 (s, p);
50}
48 51
49// a STL-compatible allocator that uses g_slice 52// a STL-compatible allocator that uses g_slice
50// boy, this is verbose 53// boy, this is verbose
51template<typename Tp> 54template<typename Tp>
52struct slice_allocator 55struct slice_allocator

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines