Skip to content

Commit

Permalink
try Jonathan's patch
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonin Reitz committed Aug 1, 2024
1 parent 85afde1 commit 0794e0e
Show file tree
Hide file tree
Showing 9 changed files with 986 additions and 1,087 deletions.
18 changes: 9 additions & 9 deletions dist/ArrayList.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ uint32_t ArrayList_read_in_place(ArrayList_cell *r, size_t idx)
size_t ArrayList_remove(ArrayList_cell *r, size_t hd1, size_t idx)
{
ArrayList_cell cell1 = r[idx];
if (cell1.next != (size_t)16777217U)
if (cell1.next != 16777217U)
{
ArrayList_cell next = r[cell1.next];
ArrayList_cell next1 = { .prev = cell1.prev, .next = next.next, .data = next.data };
r[cell1.next] = next1;
}
if (cell1.prev != (size_t)16777217U)
if (cell1.prev != 16777217U)
{
ArrayList_cell prev = r[cell1.prev];
ArrayList_cell prev1 = { .prev = prev.prev, .next = cell1.next, .data = prev.data };
Expand All @@ -32,9 +32,9 @@ size_t ArrayList_remove(ArrayList_cell *r, size_t hd1, size_t idx)

void ArrayList_insert(ArrayList_cell *r, size_t hd, size_t idx, uint32_t v)
{
ArrayList_cell cell1 = { .prev = (size_t)16777217U, .next = hd, .data = v };
ArrayList_cell cell1 = { .prev = 16777217U, .next = hd, .data = v };
r[idx] = cell1;
if (hd != (size_t)16777217U)
if (hd != 16777217U)
{
ArrayList_cell cell2 = r[hd];
ArrayList_cell cell3 = { .prev = idx, .next = cell2.next, .data = cell2.data };
Expand All @@ -44,14 +44,14 @@ void ArrayList_insert(ArrayList_cell *r, size_t hd, size_t idx, uint32_t v)

static void extend_insert__uint32_t(size_t n2, ArrayList_cell *r, size_t k, uint32_t v1)
{
for (size_t i = (size_t)0U; i < n2; i++)
for (size_t i = 0U; i < n2; i++)
{
ArrayList_cell cell1 = { .prev = (size_t)16777217U, .next = k + i, .data = v1 };
r[k + i + (size_t)1U] = cell1;
if (k + i != (size_t)16777217U)
ArrayList_cell cell1 = { .prev = 16777217U, .next = k + i, .data = v1 };
r[k + i + 1U] = cell1;
if (k + i != 16777217U)
{
ArrayList_cell cell2 = r[k + i];
ArrayList_cell cell3 = { .prev = k + i + (size_t)1U, .next = cell2.next, .data = cell2.data };
ArrayList_cell cell3 = { .prev = k + i + 1U, .next = cell2.next, .data = cell2.data };
r[k + i] = cell3;
}
}
Expand Down
8 changes: 4 additions & 4 deletions dist/Config.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ bool Config_enable_extended_size_classes = true;

bool Config_enable_sc_fast_selection = true;

size_t Config_metadata_max = (size_t)16777216U;
size_t Config_metadata_max = 16777216U;

bool Config_enable_guard_pages = true;

size_t Config_guard_pages_interval = (size_t)2U;
size_t Config_guard_pages_interval = 2U;

bool Config_enable_quarantine = true;

bool Config_enable_quarantine_trap = true;

bool Config_enable_quarantine_strict_trap = false;

size_t Config_quarantine_queue_length = (size_t)1024U;
size_t Config_quarantine_queue_length = 1024U;

size_t Config_quarantine_queue_threshold = (size_t)256U;
size_t Config_quarantine_queue_threshold = 256U;

bool Config_enable_zeroing_malloc = true;

Expand Down
8 changes: 4 additions & 4 deletions dist/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@

#include "krmllib.h"

#define CONFIG_NB_SIZE_CLASSES ((size_t)32U)
#define CONFIG_NB_SIZE_CLASSES (32U)

#define CONFIG_NB_SIZE_CLASSES_SC ((size_t)27U)
#define CONFIG_NB_SIZE_CLASSES_SC (27U)

#define CONFIG_NB_SIZE_CLASSES_SC_EX ((size_t)5U)
#define CONFIG_NB_SIZE_CLASSES_SC_EX (5U)

extern bool Config_enable_extended_size_classes;

extern bool Config_enable_sc_fast_selection;

#define CONFIG_NB_ARENAS ((size_t)4U)
#define CONFIG_NB_ARENAS (4U)

extern size_t Config_metadata_max;

Expand Down
4 changes: 2 additions & 2 deletions dist/Constants.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

uint32_t Constants_page_size = 4096U;

size_t Constants_max_sc_coef = (size_t)32U;
size_t Constants_max_sc_coef = 32U;

size_t Constants_sc_ex_slab_size = (size_t)4096U * (size_t)64U;
size_t Constants_sc_ex_slab_size = (size_t)4096U * 64U;

bool Constants_uu___is_Sc(Constants_sc_union projectee)
{
Expand Down
2 changes: 1 addition & 1 deletion dist/PtrdiffWrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
size_t PtrdiffWrapper_mmap_actual_size(size_t size)
{
size_t rem = size % (size_t)4096U;
if (rem != (size_t)0U)
if (rem != 0U)
return size - rem + (size_t)4096U;
else
return size;
Expand Down
Loading

0 comments on commit 0794e0e

Please sign in to comment.