Ask a Question

 

Start Coding Today

   

GeeksQuiz

GeeksforGeeksIDE

Data Structures

Algorithms

Interview Experiences

C Programming

C++ Programming

Java Programming

GATE CS

Books

How to make a function equivalent to malloc without using any other inbuilt function?

asked Dec 17, 2015 by passion34

1 Answer

0 votes

I don't think there is a way in C.  The only way I can think of is to make system calls using system().   But this solution is OS specific.  Different OSs may have different system calls to allocate memory on heap.   For example sbrk ( https://en.wikipedia.org/wiki/Sbrk ) in UNIX and UNIX like operating systems.

answered Dec 18, 2015 by learner

Please log in or register to answer this question.

...