ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/util.h
Revision: 1.3
Committed: Mon Sep 4 11:07:59 2006 UTC (17 years, 8 months ago) by root
Content type: text/plain
Branch: MAIN
Changes since 1.2: +2 -0 lines
Log Message:
Changes...

- alternative shstr representation, saves code
- use glibs splice memory allocator (seems slower)
- use simpler memory/lifetime management for objects, no recycling

File Contents

# User Rev Content
1 root 1.1 #ifndef UTIL_H__
2     #define UTIL_H__
3    
4 root 1.2 #if __GNUC__ >= 3
5     # define is_constant(c) __builtin_constant_p (c)
6     #else
7     # define is_constant(c) 0
8     #endif
9    
10 root 1.1 // makes dynamically allocated objects zero-initialised
11     struct zero_initialised
12     {
13     void *operator new (size_t s);
14 root 1.3 void *operator new [] (size_t s);
15 root 1.1 void operator delete (void *p, size_t s);
16 root 1.3 void operator delete [] (void *p, size_t s);
17 root 1.1 };
18    
19     #endif
20