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.66 by root, Sun Sep 9 06:56:10 2007 UTC vs.
Revision 1.67 by root, Tue Oct 16 05:34:24 2007 UTC

37#include <material.h> 37#include <material.h>
38 38
39#include <glib.h> 39#include <glib.h>
40 40
41refcnt_base::refcnt_t refcnt_dummy; 41refcnt_base::refcnt_t refcnt_dummy;
42 42size_t slice_alloc;
43rand_gen rndm; 43rand_gen rndm;
44 44
45void 45void
46tausworthe_random_generator::seed (uint32_t seed) 46tausworthe_random_generator::seed (uint32_t seed)
47{ 47{
472void *salloc_ (int n) throw (std::bad_alloc) 472void *salloc_ (int n) throw (std::bad_alloc)
473{ 473{
474#ifdef PREFER_MALLOC 474#ifdef PREFER_MALLOC
475 void *ptr = malloc (n); 475 void *ptr = malloc (n);
476#else 476#else
477 slice_alloc += n;
477 void *ptr = g_slice_alloc (n); 478 void *ptr = g_slice_alloc (n);
478#endif 479#endif
479 480
480 if (!ptr) 481 if (!ptr)
481 throw std::bad_alloc (); 482 throw std::bad_alloc ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines