diff options
author | Kevin Ryde <user42@zip.com.au> | 2001-07-07 01:58:47 +0200 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2001-07-07 01:58:47 +0200 |
commit | f0c49255fb091075fca8dc36217ac2ea8c3d22e7 (patch) | |
tree | b7f0ab9516655107090da6105d312996238c37c3 /stack-alloc.c | |
parent | 1009a73c95ef467ec5960687922504efdae7fff0 (diff) | |
download | gmp-f0c49255fb091075fca8dc36217ac2ea8c3d22e7.tar.gz |
* stack-alloc.c: Add some alignment ASSERTs.
Diffstat (limited to 'stack-alloc.c')
-rw-r--r-- | stack-alloc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/stack-alloc.c b/stack-alloc.c index fa1ccce88..fb456a1ec 100644 --- a/stack-alloc.c +++ b/stack-alloc.c @@ -50,6 +50,9 @@ __gmp_tmp_alloc (unsigned long size) { void *that; + ASSERT ((size % __TMP_ALIGN) == 0); + ASSERT (((unsigned) current->alloc_point % __TMP_ALIGN) == 0); + if (size > (char *) current->end - (char *) current->alloc_point) { void *chunk; @@ -87,6 +90,7 @@ __gmp_tmp_alloc (unsigned long size) that = current->alloc_point; current->alloc_point = (char *) that + size; + ASSERT (((unsigned) that % __TMP_ALIGN) == 0); return that; } |