]> granicus.if.org Git - libatomic_ops/commit
Test smallest allocation of large type (test_malloc)
authorIvan Maidanski <ivmai@mail.ru>
Mon, 4 Dec 2017 21:08:40 +0000 (00:08 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 4 Dec 2017 21:08:40 +0000 (00:08 +0300)
commit29d91db41c8ac8b2ddeb82fb9e02c426259a3500
treed63d8b8298f185cede7c6c20c5b9a95e279aba65
parent6ad8be39f12b8ba77286c506220bef43969614aa
Test smallest allocation of large type (test_malloc)

* src/atomic_ops_malloc.c (AO_malloc_large): Add assertion that the
stored size is greater than LOG_MAX_SIZE.
* src/atomic_ops_malloc.c (AO_malloc): Add assertions for log_size.
* tests/test_malloc.c (LOG_MAX_SIZE, CHUNK_SIZE): New macro (copied
from atomic_ops_malloc.c).
* tests/test_malloc.c (main): Call AO_free(0), AO_malloc(0),
AO_malloc(CHUNK_SIZE-sizeof(AO_t)+1); add comment.
src/atomic_ops_malloc.c
tests/test_malloc.c