<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libatomic_ops.git/tests/test_malloc.c, branch master</title>
<subtitle>github.com: ivmai/libatomic_ops.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libatomic_ops.git/'/>
<entry>
<title>Refine copyright terms in GPL source files</title>
<updated>2022-05-19T20:08:13+00:00</updated>
<author>
<name>Ivan Maidanski</name>
<email>ivmai@mail.ru</email>
</author>
<published>2022-05-19T20:08:13+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libatomic_ops.git/commit/?id=69e188067616d258cdafa5a8a4ac6f03945090a8'/>
<id>69e188067616d258cdafa5a8a4ac6f03945090a8</id>
<content type='text'>
The GPL terms are copied from COPYING file.

* src/atomic_ops_malloc.c: Refine GPL copyright text in the header
comment by copying it as-is from COPYING file (as recommended in
"Apply These Terms to Your New Programs" section).
* src/atomic_ops_stack.c: Likewise.
* tests/list_atomic.template: Likewise.
* tests/run_parallel.h: Likewise.
* tests/test_atomic.c: Likewise.
* tests/test_atomic_include.template: Likewise.
* tests/test_malloc.c: Likewise.
* tests/test_stack.c: Likewise.
* tests/test_atomic_include.h: Regenerate.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The GPL terms are copied from COPYING file.

* src/atomic_ops_malloc.c: Refine GPL copyright text in the header
comment by copying it as-is from COPYING file (as recommended in
"Apply These Terms to Your New Programs" section).
* src/atomic_ops_stack.c: Likewise.
* tests/list_atomic.template: Likewise.
* tests/run_parallel.h: Likewise.
* tests/test_atomic.c: Likewise.
* tests/test_atomic_include.template: Likewise.
* tests/test_malloc.c: Likewise.
* tests/test_stack.c: Likewise.
* tests/test_atomic_include.h: Regenerate.
</pre>
</div>
</content>
</entry>
<entry>
<title>Avoid breaking strict-aliasing rules in cons() of test_malloc</title>
<updated>2022-02-17T19:07:15+00:00</updated>
<author>
<name>Ivan Maidanski</name>
<email>ivmai@mail.ru</email>
</author>
<published>2022-02-17T19:07:15+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libatomic_ops.git/commit/?id=6d3ad32c4c12607bce64a3d2fd2dc188acd423bb'/>
<id>6d3ad32c4c12607bce64a3d2fd2dc188acd423bb</id>
<content type='text'>
* tests/test_malloc.c (cons): Change type of extras local variable from
int* to char*; set every sizeof(int) byte of extras[] to 42 (instead of
setting every int value).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* tests/test_malloc.c (cons): Change type of extras local variable from
int* to char*; set every sizeof(int) byte of extras[] to 42 (instead of
setting every int value).
</pre>
</div>
</content>
</entry>
<entry>
<title>Workaround 'argument to function assert is always 1' cppcheck warnings</title>
<updated>2018-12-19T09:12:34+00:00</updated>
<author>
<name>Ivan Maidanski</name>
<email>ivmai@mail.ru</email>
</author>
<published>2018-12-19T09:12:34+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libatomic_ops.git/commit/?id=6e9495c51d7e5b4febaab3b1f63b9c6b75a68cae'/>
<id>6e9495c51d7e5b4febaab3b1f63b9c6b75a68cae</id>
<content type='text'>
* src/atomic_ops_malloc.c (get_chunk): Skip assertion about
my_chunk_ptr value alignment if CPPCHECK.
* tests/test_malloc.c (DEFAULT_NTHREADS): Add comment about the
maximum value.
* tests/test_malloc.c (main): Remove assertion of nthreads value which
is set to DEFAULT_NTHREADS (ideally there should be a static_assert).
* tests/test_stack.c (main): Likewise.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/atomic_ops_malloc.c (get_chunk): Skip assertion about
my_chunk_ptr value alignment if CPPCHECK.
* tests/test_malloc.c (DEFAULT_NTHREADS): Add comment about the
maximum value.
* tests/test_malloc.c (main): Remove assertion of nthreads value which
is set to DEFAULT_NTHREADS (ideally there should be a static_assert).
* tests/test_stack.c (main): Likewise.
</pre>
</div>
</content>
</entry>
<entry>
<title>Convert tests to valid C++ code</title>
<updated>2018-02-08T22:12:27+00:00</updated>
<author>
<name>Ivan Maidanski</name>
<email>ivmai@mail.ru</email>
</author>
<published>2018-02-08T22:12:27+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libatomic_ops.git/commit/?id=7b9d74b6649d2ab092f6c3694f9262da232ccdd6'/>
<id>7b9d74b6649d2ab092f6c3694f9262da232ccdd6</id>
<content type='text'>
* tests/test_malloc.c (cons, dummy_test, run_one_test): Add explicit
cast of void* pointer (returned by malloc) to the type of the variable
the pointer is assigned to.
* tests/test_stack.c (add_elements): Likewise.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* tests/test_malloc.c (cons, dummy_test, run_one_test): Add explicit
cast of void* pointer (returned by malloc) to the type of the variable
the pointer is assigned to.
* tests/test_stack.c (add_elements): Likewise.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fill in allocated memory with values depending on thread id (test_malloc)</title>
<updated>2017-12-20T07:31:07+00:00</updated>
<author>
<name>Ivan Maidanski</name>
<email>ivmai@mail.ru</email>
</author>
<published>2017-12-20T07:31:07+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libatomic_ops.git/commit/?id=f717adfdb9ec476929586cf551cdf52ff7132584'/>
<id>f717adfdb9ec476929586cf551cdf52ff7132584</id>
<content type='text'>
* tests/test_malloc.c (run_one_test): Define new local variables a, b
(with the values depending on arg); replace 'a' and 'b' with a and b,
respectively; reformat the code; return NULL instead of arg; remove
the comment (the workaround is no longer needed).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* tests/test_malloc.c (run_one_test): Define new local variables a, b
(with the values depending on arg); replace 'a' and 'b' with a and b,
respectively; reformat the code; return NULL instead of arg; remove
the comment (the workaround is no longer needed).
</pre>
</div>
</content>
</entry>
<entry>
<title>Do not test CHUNK_SIZE allocation if no mmap() available (test_malloc)</title>
<updated>2017-12-19T09:05:01+00:00</updated>
<author>
<name>Ivan Maidanski</name>
<email>ivmai@mail.ru</email>
</author>
<published>2017-12-19T09:05:01+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libatomic_ops.git/commit/?id=937b1737dad1c93fc903558a19098b403e32314c'/>
<id>937b1737dad1c93fc903558a19098b403e32314c</id>
<content type='text'>
(fix commit 29d91db)

* tests/test_malloc.c (main): Do not call AO_malloc(CHUNK_SIZE) unless
HAVE_MMAP.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(fix commit 29d91db)

* tests/test_malloc.c (main): Do not call AO_malloc(CHUNK_SIZE) unless
HAVE_MMAP.
</pre>
</div>
</content>
</entry>
<entry>
<title>New macro (DONT_USE_MMAP) to support testing as if mmap() is unavailable</title>
<updated>2017-12-19T08:19:44+00:00</updated>
<author>
<name>Ivan Maidanski</name>
<email>ivmai@mail.ru</email>
</author>
<published>2017-12-19T08:19:44+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libatomic_ops.git/commit/?id=f76d4727548372a40337fd2e9aed558f6ebadf83'/>
<id>f76d4727548372a40337fd2e9aed558f6ebadf83</id>
<content type='text'>
* src/atomic_ops_malloc.c [DONT_USE_MMAP] (HAVE_MMAP): Undefine (after
including config.h).
* tests/test_malloc.c [DONT_USE_MMAP] (HAVE_MMAP): Likewise.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/atomic_ops_malloc.c [DONT_USE_MMAP] (HAVE_MMAP): Undefine (after
including config.h).
* tests/test_malloc.c [DONT_USE_MMAP] (HAVE_MMAP): Likewise.
</pre>
</div>
</content>
</entry>
<entry>
<title>Increase the default number of threads to 16 in test_malloc/stack</title>
<updated>2017-12-06T21:39:04+00:00</updated>
<author>
<name>Ivan Maidanski</name>
<email>ivmai@mail.ru</email>
</author>
<published>2017-12-06T21:39:04+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libatomic_ops.git/commit/?id=19f5ae6e4e663b0abe59e4c6774ef0582bc54486'/>
<id>19f5ae6e4e663b0abe59e4c6774ef0582bc54486</id>
<content type='text'>
* tests/test_malloc.c [!DEFAULT_NTHREADS &amp;&amp; HAVE_MMAP]
(DEFAULT_NTHREADS): Change the value from 10 to 16.
* tests/test_stack.c [!DEFAULT_NTHREADS] (DEFAULT_NTHREADS): Change
the value from 4 to 16.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* tests/test_malloc.c [!DEFAULT_NTHREADS &amp;&amp; HAVE_MMAP]
(DEFAULT_NTHREADS): Change the value from 10 to 16.
* tests/test_stack.c [!DEFAULT_NTHREADS] (DEFAULT_NTHREADS): Change
the value from 4 to 16.
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow to alter DEFAULT/MAX_NTHREADS values in test_malloc/stack</title>
<updated>2017-12-06T21:22:41+00:00</updated>
<author>
<name>Ivan Maidanski</name>
<email>ivmai@mail.ru</email>
</author>
<published>2017-12-06T21:22:41+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libatomic_ops.git/commit/?id=7ed52a6af722cc37401464bef55e6545295a7554'/>
<id>7ed52a6af722cc37401464bef55e6545295a7554</id>
<content type='text'>
(code refactoring)

* tests/run_parallel.h [!MAX_NTHREADS] (MAX_NTHREADS): Define (move
from test_malloc.c).
* tests/run_parallel.h [USE_PTHREADS || USE_VXTHREADS
|| USE_WINTHREADS] (run_parallel): Replace 100 with MAX_NTHREADS.
* tests/test_malloc.c (main): Add assertion that DEFAULT_NTHREADS
is not greater than MAX_NTHREADS.
* tests/test_stack.c (main): Likewise.
* tests/test_stack.c [!DEFAULT_NTHREADS] (DEFAULT_NTHREADS): Define
(to 4).
* tests/test_stack.c (main): Use DEFAULT_NTHREADS (instead of 4).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(code refactoring)

* tests/run_parallel.h [!MAX_NTHREADS] (MAX_NTHREADS): Define (move
from test_malloc.c).
* tests/run_parallel.h [USE_PTHREADS || USE_VXTHREADS
|| USE_WINTHREADS] (run_parallel): Replace 100 with MAX_NTHREADS.
* tests/test_malloc.c (main): Add assertion that DEFAULT_NTHREADS
is not greater than MAX_NTHREADS.
* tests/test_stack.c (main): Likewise.
* tests/test_stack.c [!DEFAULT_NTHREADS] (DEFAULT_NTHREADS): Define
(to 4).
* tests/test_stack.c (main): Use DEFAULT_NTHREADS (instead of 4).
</pre>
</div>
</content>
</entry>
<entry>
<title>Test smallest allocation of large type (test_malloc)</title>
<updated>2017-12-04T21:08:40+00:00</updated>
<author>
<name>Ivan Maidanski</name>
<email>ivmai@mail.ru</email>
</author>
<published>2017-12-04T21:08:40+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libatomic_ops.git/commit/?id=29d91db41c8ac8b2ddeb82fb9e02c426259a3500'/>
<id>29d91db41c8ac8b2ddeb82fb9e02c426259a3500</id>
<content type='text'>
* 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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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.
</pre>
</div>
</content>
</entry>
</feed>
