diff options
author | Thomas Koenig <tkoenig@gcc.gnu.org> | 2020-11-09 22:22:05 +0100 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2020-11-09 22:22:05 +0100 |
commit | dd06247d91866b75c2f5512320737a31da7a6e16 (patch) | |
tree | c2eb16c2d10ec4b797192ea185eb173dd47cf0f3 | |
parent | abc2c4bf5d39f9a7a91f45317f6eadc302792d6b (diff) | |
download | gcc-dd06247d91866b75c2f5512320737a31da7a6e16.zip gcc-dd06247d91866b75c2f5512320737a31da7a6e16.tar.gz gcc-dd06247d91866b75c2f5512320737a31da7a6e16.tar.bz2 |
Fix test for size of memory allocation.
libgfortran/ChangeLog:
* nca/shared_memory.c (shared_memory_get_mem_with_alignment):
Fix test.
-rw-r--r-- | libgfortran/nca/shared_memory.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libgfortran/nca/shared_memory.c b/libgfortran/nca/shared_memory.c index 0d80b79..7e959f2 100644 --- a/libgfortran/nca/shared_memory.c +++ b/libgfortran/nca/shared_memory.c @@ -145,7 +145,7 @@ shared_memory_get_mem_with_alignment (shared_memory_act **pmem, size_t size, /* We need to enlarge the memory segment. Double the size if that is big enough, otherwise get what's needed. */ - if (mem->meta->size * 2 < used_wa + size) + if (mem->meta->size * 2 > used_wa + size) new_size = mem->meta->size * 2; else new_size = round_to_pagesize (used_wa + size); |