Home
Blogs
Questions
Jobs
Monetize

Home

About Us

Blogs

Questions

Jobs

Monetize

Post Job

banner

Questions about sbrk

Read more about sbrk

python (12.9k questions)

javascript (9.2k questions)

reactjs (4.7k questions)

java (4.2k questions)

java (4.2k questions)

c# (3.5k questions)

c# (3.5k questions)

html (3.3k questions)

Questions - sbrk

Abort in glibc while trying to use sbrk to reduce the size of the data segment

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, then free it, then reduce data segment with sbrk,...
test-img

Arc

gcc

heap-memory

glibc

mmap

sbrk

Votes: 0

Answers: 2

Latest Answer

It is well-documented that glibc malloc uses sbrk internally. Absent a statement that says otherwise, it can also use memory obtained with sbrk for internal bookkeeping purposes. It is neither documen...
test-img

n. m.

How to free the heap memory in MIPS

For learning purposes, I'm trying to implement a stack in the heap memory. When I push something I just need to do the systemcall sbrk, and that's fine. When I proceed with a pop I can retrive my valu...
test-img

Vavaste

assembly

mips

mars-simulator

sbrk

Votes: 0

Answers: 1

Latest Answer

Unlike the real sbrk in UNIX, QtSpim/MARS syscall #9 doesn't support returning memory from the heap back to the system. But, you can implement sbrk functionality yourself, as it is fairly simple.  (ma...
test-img

Erik Eidt

Posts

Questions

Blogs

Jobs

The ultimate platform for coders and IT specialists

About

  • Company
  • Support

  • Platform

  • Terms & Conditions
  • Privacy statement
  • Cookie policy
  • Cookie option
  • OnlyCoders © 2025  |  All rights reserved