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.9 by root, Sun Sep 10 16:00:23 2006 UTC vs.
Revision 1.10 by root, Mon Sep 11 01:16:20 2006 UTC

1 1
2/* 2/*
3 * static char *rcsid_utils_c = 3 * static char *rcsid_utils_c =
4 * "$Id: utils.C,v 1.9 2006/09/10 16:00:23 root Exp $"; 4 * "$Id: utils.C,v 1.10 2006/09/11 01:16:20 root Exp $";
5 */ 5 */
6 6
7/* 7/*
8 CrossFire, A Multiplayer game for X-windows 8 CrossFire, A Multiplayer game for X-windows
9 9
548 strcpy (input, tmp); 548 strcpy (input, tmp);
549 return; 549 return;
550} 550}
551 551
552void * 552void *
553zero_initialised::operator new (size_t s, void *p)
554{
555 memset (p, 0, s);
556 return p;
557}
558
559void *
553 zero_initialised::operator 560zero_initialised::operator new (size_t s)
554new (size_t s)
555{ 561{
556 //return calloc (1, s); 562 //return calloc (1, s);
557 return g_slice_alloc0 (s); 563 return g_slice_alloc0 (s);
558} 564}
559 565
560void * 566void *
561 zero_initialised::operator 567 zero_initialised::operator new[] (size_t s)
562new[] (size_t s)
563{ 568{
564 //return calloc (1, s); 569 //return calloc (1, s);
565 return g_slice_alloc0 (s); 570 return g_slice_alloc0 (s);
566} 571}
567 572
568void 573void
569 zero_initialised::operator 574zero_initialised::operator delete (void *p, size_t s)
570delete (void *p, size_t s)
571{ 575{
572 //free (p); return; 576 //free (p); return;
573 g_slice_free1 (s, p); 577 g_slice_free1 (s, p);
574} 578}
575 579
576void 580void
577 zero_initialised::operator 581zero_initialised::operator delete[] (void *p, size_t s)
578delete[] (void *p, size_t s)
579{ 582{
580 //free (p); return; 583 //free (p); return;
581 g_slice_free1 (s, p); 584 g_slice_free1 (s, p);
582} 585}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines