diff options
author | Zoltan Varga <vargaz@gmail.com> | 2006-05-23 19:23:37 +0400 |
---|---|---|
committer | Zoltan Varga <vargaz@gmail.com> | 2006-05-23 19:23:37 +0400 |
commit | 18ad006ce88663d7a200d46187da1a9f72ca8b0c (patch) | |
tree | 1e7816fc24587bd18c28c4a0677a50d0d493a656 /libgc | |
parent | e0a3088816ab6741a4c2b739547b4f5833a900a1 (diff) |
2006-05-23 Zoltan Varga <vargaz@gmail.com>
* os_dep.c (GC_unix_get_mem): Add an assert to bail out early if the runtime is
run on a machine with smaller page size than HBLKSIZE.
svn path=/trunk/mono/; revision=61001
Diffstat (limited to 'libgc')
-rw-r--r-- | libgc/ChangeLog | 5 | ||||
-rw-r--r-- | libgc/os_dep.c | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/libgc/ChangeLog b/libgc/ChangeLog index ac2fd1f843c..45112d6ed1e 100644 --- a/libgc/ChangeLog +++ b/libgc/ChangeLog @@ -1,3 +1,8 @@ +2006-05-23 Zoltan Varga <vargaz@gmail.com> + + * os_dep.c (GC_unix_get_mem): Add an assert to bail out early if the runtime is + run on a machine with smaller page size than HBLKSIZE. + 2006-05-19 Martin Baulig <martin@ximian.com> * include/gc.h: Don't include "libgc-mono-debugger.h". diff --git a/libgc/os_dep.c b/libgc/os_dep.c index ef80a9d093e..e92a9ef636c 100644 --- a/libgc/os_dep.c +++ b/libgc/os_dep.c @@ -1617,6 +1617,8 @@ word bytes; # else GC_ASSERT(last_addr != 0); # endif + if (((word)result % HBLKSIZE) != 0) + ABORT ("GC_unix_get_mem: Memory returned by mmap is not aligned to HBLKSIZE."); return((ptr_t)result); } |