ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/utils.C
(Generate patch)

Comparing deliantra/server/common/utils.C (file contents):
Revision 1.105 by root, Thu Jan 19 21:51:43 2017 UTC vs.
Revision 1.106 by root, Wed Nov 14 22:52:13 2018 UTC

130 130
131 LOG (llevError, "fork abort: %s\n", msg); 131 LOG (llevError, "fork abort: %s\n", msg);
132} 132}
133 133
134void * 134void *
135salloc_ (int n) throw (std::bad_alloc) 135salloc_ (int n)
136{ 136{
137 void *ptr = g_slice_alloc (n); 137 void *ptr = g_slice_alloc (n);
138 138
139 if (!ptr) 139 if (!ptr)
140 throw std::bad_alloc (); 140 throw std::bad_alloc ();
142 slice_alloc += n; 142 slice_alloc += n;
143 return ptr; 143 return ptr;
144} 144}
145 145
146void * 146void *
147salloc_ (int n, void *src) throw (std::bad_alloc) 147salloc_ (int n, void *src)
148{ 148{
149 void *ptr = salloc_ (n); 149 void *ptr = salloc_ (n);
150 150
151 if (src) 151 if (src)
152 memcpy (ptr, src, n); 152 memcpy (ptr, src, n);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines