This code segfaults on line 97 (according to gdb) on one machine (Linode) yet runs just fine on a different machine (personal) and I haven't really be ...
This code segfaults on line 97 (according to gdb) on one machine (Linode) yet runs just fine on a different machine (personal) and I haven't really be ...
While working with glibc I tried to reduce the data segment using sbrk using a negative parameter, and found a most strange behaviour. I first malloc ...
for learning pourposes I'm trying to implement a stack in the heap memory, When I push somthing I just need to do the systemcall sbrk, and that's fine ...
Ever since I was introduced to C, I was told that in C dynamic memory allocation is done using the functions in the malloc family. I also learned that ...
I have the following function: And want to use it like this: But I am getting error: How may I convert void* ie a pointer to number? is that ...
I want to make sure the return address of sbrk is within a certain specific range. I read somewhere that sbrk allocates from an area allocated at prog ...
I am trying to make my own implementation of a memory allocator in C. When I try to compile my code in the terminal on Mac OS Catalina it says that th ...
My question is as tilte says, accroding to my text book int brk(void *end_data_segment); The brk() system call sets the program break to the ...
I'm trying to implement my own version of the memory allocator malloc(). However I was pointed that in my case the brk() has exceeded the max heap. I ...
Running this piece of code is supposed to cause program break to increase by about malloc_counts * _SC_PAGESIZE instead I get fixed program break each ...
I am having a hard time understanding sbrk() and mmap(), as well as munmap(). This is closely related to How do I free memory obtained by sbrk()? but ...
Hi I have Written a memory allocator, and works perfectly. I use sbrk/brk for page allocation and deallocation. But it all breaks the moment i start p ...
I'm re-coding the malloc function using brk, sbrk & getpagesize() I must follow two rules: 1) I must align my memory on a power of 2 It means: ...
So, as far as I know, malloc returns a pointer to a location in the heap. sbrk() expands the heap by a minimum of 4k If I could not use malloc, for ...
I am writing a custom memory allocator in my program and trying to better understand what is considered allocated vs unallocated memory. I am told tha ...
I am trying to implement understand how dynamic memory allocation is happening. So I thought of implementing malloc of my own using sbrk() system call ...
I've heard in a lot of places (musl mailing list, macOS forums, etc.) that brk() and sbrk() are unsafe. Many of these places either don't give explana ...
I would like to know what the current sbrk() limit is to debug a SEGV I'm having a hard time with. My code looks good and works in most cases (only on ...
I'm trying to understand the sbrk() function. From what I know: sbrk(0) returns the current address of the break and doesn't increment it. sbrk(size ...
For school, I need to write a program that uses my own implementation of malloc and free. I need to be able to report on all the chunks of memory in m ...