Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mail/dbmail: Remove dead sbrk linkage
Differential Revision: https://reviews.freebsd.org/D42973
- Loading branch information
1 parent
39eeae6
commit c59c5ad
Showing
2 changed files
with
39 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- src/mpool/mpool.c.orig | ||
+++ src/mpool/mpool.c | ||
@@ -241,6 +241,7 @@ | ||
(void)printf("allocating %u pages or %lu bytes\n", page_n, size); | ||
#endif | ||
|
||
+#if 0 | ||
if (BIT_IS_SET(mp_p->mp_flags, MPOOL_FLAG_USE_SBRK)) { | ||
mem = sbrk(size); | ||
if (mem == (void *)-1) { | ||
@@ -263,7 +264,9 @@ | ||
mem = (char *)mem + fill; | ||
} | ||
} | ||
- else { | ||
+ else | ||
+#endif | ||
+ { | ||
state = MAP_PRIVATE; | ||
#ifdef MAP_FILE | ||
state |= MAP_FILE; | ||
@@ -937,12 +940,15 @@ | ||
} | ||
} | ||
|
||
+#if 0 | ||
if (BIT_IS_SET(flags, MPOOL_FLAG_USE_SBRK)) { | ||
mp.mp_fd = -1; | ||
mp.mp_addr = NULL; | ||
mp.mp_top = 0; | ||
} | ||
- else { | ||
+ else | ||
+#endif | ||
+ { | ||
/* open dev-zero for our mmaping */ | ||
mp.mp_fd = open("/dev/zero", O_RDWR, 0); | ||
if (mp.mp_fd < 0) { |