Mercurial > hg > xemacs-beta
comparison src/free-hook.c @ 3988:1227374e7199
[xemacs-hg @ 2007-05-26 18:28:19 by aidan]
Make double-free checks 64-bit safe, from Sebastian Freundt.
author | aidan |
---|---|
date | Sat, 26 May 2007 18:28:23 +0000 |
parents | 24c38b122889 |
children | 6f2158fa75ed |
comparison
equal
deleted
inserted
replaced
3987:445918763299 | 3988:1227374e7199 |
---|---|
177 { | 177 { |
178 unsigned long long_length = (size + (sizeof (long) - 1)) | 178 unsigned long long_length = (size + (sizeof (long) - 1)) |
179 / sizeof (long); | 179 / sizeof (long); |
180 unsigned long i; | 180 unsigned long i; |
181 | 181 |
182 /* Not using the DEADBEEF_CONSTANT #define, since we don't know | |
183 * that allocation sizes will be multiples of eight. */ | |
182 for (i = 0; i < long_length; i++) | 184 for (i = 0; i < long_length; i++) |
183 ((unsigned long *) ptr)[i] = 0xdeadbeef; | 185 ((unsigned long *) ptr)[i] = 0xdeadbeef; |
184 } | 186 } |
185 #endif | 187 #endif |
186 free_queue[current_free].address = ptr; | 188 free_queue[current_free].address = ptr; |