mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-22 08:37:18 +03:00
Avoid function prototype incompatibilities.
Add various function attributes to the exported functions to give the compiler more information to work with during optimization, and also specify throw() when compiling with C++ on Linux, in order to adequately match what __THROW does in glibc. This resolves #237.
This commit is contained in:
parent
dde067264d
commit
ae93d6bf36
7 changed files with 100 additions and 49 deletions
|
|
@ -23,7 +23,7 @@ TEST_BEGIN(test_bitmap_init)
|
|||
bitmap_info_init(&binfo, i);
|
||||
{
|
||||
size_t j;
|
||||
bitmap_t *bitmap = malloc(sizeof(bitmap_t) *
|
||||
bitmap_t *bitmap = (bitmap_t *)malloc(sizeof(bitmap_t) *
|
||||
bitmap_info_ngroups(&binfo));
|
||||
bitmap_init(bitmap, &binfo);
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ TEST_BEGIN(test_bitmap_set)
|
|||
bitmap_info_init(&binfo, i);
|
||||
{
|
||||
size_t j;
|
||||
bitmap_t *bitmap = malloc(sizeof(bitmap_t) *
|
||||
bitmap_t *bitmap = (bitmap_t *)malloc(sizeof(bitmap_t) *
|
||||
bitmap_info_ngroups(&binfo));
|
||||
bitmap_init(bitmap, &binfo);
|
||||
|
||||
|
|
@ -69,7 +69,7 @@ TEST_BEGIN(test_bitmap_unset)
|
|||
bitmap_info_init(&binfo, i);
|
||||
{
|
||||
size_t j;
|
||||
bitmap_t *bitmap = malloc(sizeof(bitmap_t) *
|
||||
bitmap_t *bitmap = (bitmap_t *)malloc(sizeof(bitmap_t) *
|
||||
bitmap_info_ngroups(&binfo));
|
||||
bitmap_init(bitmap, &binfo);
|
||||
|
||||
|
|
@ -98,7 +98,7 @@ TEST_BEGIN(test_bitmap_sfu)
|
|||
bitmap_info_init(&binfo, i);
|
||||
{
|
||||
ssize_t j;
|
||||
bitmap_t *bitmap = malloc(sizeof(bitmap_t) *
|
||||
bitmap_t *bitmap = (bitmap_t *)malloc(sizeof(bitmap_t) *
|
||||
bitmap_info_ngroups(&binfo));
|
||||
bitmap_init(bitmap, &binfo);
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ static rtree_node_elm_t *
|
|||
node_alloc(size_t nelms)
|
||||
{
|
||||
|
||||
return (calloc(nelms, sizeof(rtree_node_elm_t)));
|
||||
return ((rtree_node_elm_t *)calloc(nelms, sizeof(rtree_node_elm_t)));
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue