pike.git/
src/
block_allocator.c
Branch:
Tag:
Non-build tags
All tags
No tags
2014-12-04
2014-12-04 19:26:00 by Martin Nilsson <nilsson@opera.com>
b81a1dad883d72fe3cff9eef009a19368eed83fe (
7
lines) (+
4
/-
3
)
[
Show
|
Annotate
]
Branch:
bill/master_archive_support
mallocs nowdays return void*, so no need to case.
74:
size_t n = l.offset + l.block_size + l.doffset; struct ba_page * p; if (l.alignment) {
-
p =
(struct ba_page*)
aligned_alloc(n, l.alignment);
+
p = aligned_alloc(n, l.alignment);
} else { #ifdef DEBUG_MALLOC /* In debug malloc mode, calling xalloc from the block alloc may result * in a deadlock, since xalloc will call ba_alloc, which in turn may call xalloc. */
-
p =
(struct ba_page*)
system_malloc(n);
+
p = system_malloc(n);
if (!p) { fprintf(stderr, "Fatal: Out of memory.\n"); exit(17); } #else
-
p =
(struct ba_page*)
xalloc(n);
+
p = xalloc(n);
#endif } ba_clear_page(a, p, &a->l);