Skip to content

Commit

Permalink
don't use malloc for CUSTOM_HOST
Browse files Browse the repository at this point in the history
  • Loading branch information
camel-cdr committed Jul 14, 2024
1 parent bdb5425 commit e3ca729
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bench/bench.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void bench_main(void);
ux checksum(size_t n);
void init(void);

#if __STDC_HOSTED__
#if __STDC_HOSTED__ && !defined(CUSTOM_HOST)
# include <stdlib.h>
#else
static ux heap[1 + MAX_MEM / sizeof(ux)];
Expand All @@ -72,7 +72,7 @@ int
main(void)
{

#if __STDC_HOSTED__
#if __STDC_HOSTED__ && !defined(CUSTOM_HOST)
mem = malloc(MAX_MEM);
#else
mem = (unsigned char*)heap;
Expand Down

0 comments on commit e3ca729

Please sign in to comment.