December 2007

31 December 07

salam dustanface-smile-big.png bebinid baraye memory allocation hamuntor ke goftam mitunid az system call e brk estefade konid amma baraye estefade az in system call bayad ye seri chizha ro roayat konid ke dar hite etela@ shoma nemigonje pas baraye asuntar shodane karetun malloc C ro call konid va ba un memory allocation konid, pas baraye rahat tar shodane karetun malloc ro link konid be barnamatun va mma unaii ke az system call e brk ke heap ro baraye barname afzayesh mide DOROST estefade konan nomre ezafe kheili khubi migiran in nomre ezafe mitune baraye jobrane emtehan e amalitun kheili mofid bashe. pas tosiye mikonam unaii ke dus daran jobran konan nomre badeshunoface-smile-big.png az brk estefade konand,baraye ashna shodan ba in system call va tanzimatesh yekam bayad etela@ OS ii dashte bashin,memory paging,... movafagh bashidface-wink.png


You might wonder what that thing is all about. well I'll explain it to you then. That's strictly a pasted text from a useless Yahoo! group on the net from the University in which I study (or at least I used to think so). There was a time actually in which we used to avoid deprecated stuff. (don't know what deprecated stuffs are? don't worry. quit reading this not-useful-at-all post right NOW I mean it)


strtok(), brk() and sbrk() were considered the "deprecated stuff". No one really uses them; Standard C doesn't really care about them either. (look forward to see why they should be avoided in their respective manuals)


But the above post was very interesting to me, setting some *BONUS* points if you use "deprecated stuff". encourage people to use "deprecated stuff". Yay! regardless of the fact that the poster didn't have the basic knowledge of what brk() really is (it's definitely not a syscall, it's a library routine; living in glibc because of compatibility and no other reason. brk() and sbrk() are both C wrappers of mremap() syscall) and along with the fact that the poster generalized the lovely idea of that "Surely, none of you fools have this dark-side-of-the-force knowledge" and using of Pinglish in an official university newsgroup, the usage of those ugly emoticons in his post is a heavy burden to me. That's why I never post anything to that group. It makes me feel dumb enough to hang my self upside-down with a rope of a friend of mine. (emoticons are the stuffs that should be killed, drowned, burnt and then get badly hurt). Imagine an official university assignment which has those lovely stuffs in it ( ": D", ": P" and all others)


Above all, brk() doesn't really extend HEAP (I mean what the hell does that mean "heap extension"?. what it does is simply extending the global stack frame size of a process or data segment by remapping a virtual memory address). Finally you can't definitely link malloc() to your program; The compiler will hurt you very bad if you try to do so. Instead politely try to link your program against libc and yes, I'll definitely stick with malloc().


I don't really care what they do, it's *NOT* important to me at all. But the fact that University is starting to waste my time this way is a bit annoying. I mean why the bloody hell I have to dedicate this amount of time on useless assignments like that... I can't tolerate it any longer. But what should I do? I mean what *CAN* I do? probably the answer is a single word and that's "nothing".


If there were a school for, say, sheet metal workers, that after three years left its graduates as unprepared for their careers as does law school, it would be closed down in a minute, and no doubt by lawyers.
Michael Levin, "The Socratic Method"
27 December 07

« Back to my homepage

Categories

Blog Archives

Search

Friends

Sara Amirahmadi
Alan Baghumian
Omid Fathi
Navid Paya
Milad Raastian
Behnam Behjatmarandi
Mola Pahnadayan
Ebrahim Mohammadi Panah
Amir Mohammad Saeid
Hossein Mortazavi
Sasan Rose
Abbas Esmaeeli
Vahid Rafiei
Armen Baghumian
Emil Sedgh
Hamidreza Davoodi
Kaveh Razavi
Siavash Safi
Pedram Azimaie
Mohsen Pahlevanzadeh
Ali Sattari
Nima Mohammadi
Omid Mottaghi
Bahram Siyaadati
Saied Taghvi

Read List

UNIX Systems Programming: Communication, Concurrency and Threads (2nd Edition) Advanced Linux Programming (Landmark)

Professional Assembly Language (Programmer to Programmer) Operating Systems Design and Implementation (3rd Edition) (Prentice Hall Software Series)

    Feeds

    rss
    atom

    Last.fm