aboutsummaryrefslogtreecommitdiff
path: root/src/util/common_allocation.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2009-11-10 08:16:49 +0000
committerChristian Grothoff <christian@grothoff.org>2009-11-10 08:16:49 +0000
commit660c6da4fcbca6bd2cb15599dfe3c6d53b890c7f (patch)
treea4085d49c56bd9498cf5b40847a6aa29c31ac618 /src/util/common_allocation.c
parent167aef74f57116be5a859d0c0568102943f54ab8 (diff)
downloadgnunet-660c6da4fcbca6bd2cb15599dfe3c6d53b890c7f.tar.gz
gnunet-660c6da4fcbca6bd2cb15599dfe3c6d53b890c7f.zip
indent
Diffstat (limited to 'src/util/common_allocation.c')
-rw-r--r--src/util/common_allocation.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/util/common_allocation.c b/src/util/common_allocation.c
index 1e546b962..5be7caaa7 100644
--- a/src/util/common_allocation.c
+++ b/src/util/common_allocation.c
@@ -32,11 +32,11 @@
32#endif 32#endif
33 33
34#if 0 34#if 0
35 #define W32_MEM_LIMIT 200000000 35#define W32_MEM_LIMIT 200000000
36#endif 36#endif
37 37
38#ifdef W32_MEM_LIMIT 38#ifdef W32_MEM_LIMIT
39 static LONG mem_used = 0; 39static LONG mem_used = 0;
40#endif 40#endif
41 41
42/** 42/**
@@ -66,7 +66,7 @@ GNUNET_xmalloc_unchecked_ (size_t size, const char *filename, int linenumber)
66 void *result; 66 void *result;
67 67
68#ifdef W32_MEM_LIMIT 68#ifdef W32_MEM_LIMIT
69 size += sizeof(size_t); 69 size += sizeof (size_t);
70 if (mem_used + size > W32_MEM_LIMIT) 70 if (mem_used + size > W32_MEM_LIMIT)
71 return NULL; 71 return NULL;
72#endif 72#endif
@@ -109,7 +109,7 @@ GNUNET_xrealloc_ (void *ptr,
109 const char *filename, int linenumber) 109 const char *filename, int linenumber)
110{ 110{
111#ifdef W32_MEM_LIMIT 111#ifdef W32_MEM_LIMIT
112 n += sizeof(size_t); 112 n += sizeof (size_t);
113 ptr = &((size_t *) ptr)[-1]; 113 ptr = &((size_t *) ptr)[-1];
114 mem_used = mem_used - *((size_t *) ptr) + n; 114 mem_used = mem_used - *((size_t *) ptr) + n;
115#endif 115#endif