Why would I get an error like this when calling sbrk()?

159 Views Asked by At

So I call sbrk like this:

void *return_value = sbrk(1024);

And when I debug it is giving me this error on that specific line:

__GI___sbrk (increment=1024) at sbrk.c:32
32 sbrk.c: No such file or directory.

Why would this be? And what is this error?

EDIT: Example code

int list1[10];
void* return_val;

if (list[1] == 0){
return_val = sbrk(1024);
list1[0] = 32;
}

This is the part of my code where it errors out.

0

There are 0 best solutions below