Skip to content

Commit

Permalink
panic if loadmem is called >once
Browse files Browse the repository at this point in the history
  • Loading branch information
anttikantee committed Jun 19, 2015
1 parent 536a95c commit 68a211e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions platform/hw/pgalloc.c
Expand Up @@ -192,11 +192,16 @@ print_chunks(void *start, int nr_pages)
void
bmk_pgalloc_loadmem(unsigned long min, unsigned long max)
{
static int called;
unsigned long range, bitmap_size;
chunk_head_t *ch;
chunk_tail_t *ct;
int i;

if (called)
bmk_platform_halt("bmk_pgalloc_loadmem called more than once");
called = 1;

bmk_assert(max > min);

for (i = 0; i < FREELIST_SIZE; i++) {
Expand Down

0 comments on commit 68a211e

Please sign in to comment.