Thread: How to implement brk() system call from the scratch

  1. #1
    Registered User
    Join Date
    Apr 2011
    Posts
    26

    Talking How to implement brk() system call from the scratch

    for my project i need to implement brk() system call.Is there any C/C++ code to implement that?please this is really urgent?

    Thank you

  2. #2
    Registered User
    Join Date
    Mar 2009
    Posts
    344
    Should be there in various Linux and *BSD implementations. But they're going to be highly specific to your OS so I don't know if copy and paste is the correct answer here.

  3. #3
    Registered User
    Join Date
    Apr 2011
    Posts
    26
    give me some link to reffer

  4. #4
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Sure, you could implement this in pure C++, but that would a terribly waste of memory.
    Better use some OS-specific calls, so that begs the question: what operating system?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. system call
    By kastrup_carioca in forum C Programming
    Replies: 7
    Last Post: 01-30-2006, 03:05 PM
  2. System call
    By the_head in forum C Programming
    Replies: 1
    Last Post: 10-04-2003, 06:32 AM
  3. C system call and library call
    By Coconut in forum C Programming
    Replies: 6
    Last Post: 08-22-2002, 11:20 AM
  4. system call
    By stautze in forum C Programming
    Replies: 2
    Last Post: 05-07-2002, 12:48 PM
  5. What is the best way to implement a system like this? NLP...
    By blackwyvern in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 01-28-2002, 03:04 AM