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.6 by root, Fri Sep 8 16:51:43 2006 UTC vs.
Revision 1.8 by root, Sat Sep 9 21:48:28 2006 UTC

1/* 1/*
2 * static char *rcsid_utils_c = 2 * static char *rcsid_utils_c =
3 * "$Id: utils.C,v 1.6 2006/09/08 16:51:43 root Exp $"; 3 * "$Id: utils.C,v 1.8 2006/09/09 21:48:28 root Exp $";
4 */ 4 */
5 5
6/* 6/*
7 CrossFire, A Multiplayer game for X-windows 7 CrossFire, A Multiplayer game for X-windows
8 8
485 } 485 }
486 else strcpy(input, tmp); 486 else strcpy(input, tmp);
487 return; 487 return;
488} 488}
489 489
490//TODO: overhead due to specifying size twice
491void * 490void *
492zero_initialised::operator new (size_t s) 491zero_initialised::operator new (size_t s)
493{ 492{
494printf ("new(%d)\n", s);//D 493 //return calloc (1, s);
495 return g_slice_alloc0 (s); 494 return g_slice_alloc0 (s);
496} 495}
497 496
498void * 497void *
499zero_initialised::operator new [] (size_t s) 498zero_initialised::operator new [] (size_t s)
500{ 499{
501printf ("new[](%d)\n", s);//D 500 //return calloc (1, s);
502 return g_slice_alloc0 (s); 501 return g_slice_alloc0 (s);
503} 502}
504 503
505void 504void
506zero_initialised::operator delete (void *p, size_t s) 505zero_initialised::operator delete (void *p, size_t s)
507{ 506{
507 //free (p); return;
508 g_slice_free1 (s, p); 508 g_slice_free1 (s, p);
509} 509}
510 510
511void 511void
512zero_initialised::operator delete [] (void *p, size_t s) 512zero_initialised::operator delete [] (void *p, size_t s)
513{ 513{
514 //free (p); return;
514 g_slice_free1 (s, p); 515 g_slice_free1 (s, p);
515} 516}
516 517

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines