[bitlug] Re: BITLug: 'Mem mgmt' Sat,24 Apr,1200pm,BIT

  • From: "Prasad, Gopal (IE10)" <Prasad.Gopal@xxxxxxxxxxxxx>
  • To: bitlug@xxxxxxxxxxxxx
  • Date: Mon, 26 Apr 2004 02:24:57 -0700

 we have been discussing about where the string "temporary"( in the program
below) gets allocated in the last two talks and the reason for it be

 int main() {
    char *c = "temporary";
   c[4] = 'a' ;
   printf("%s", c);
  return 0;

 I saw that a separate section called ".rodata" was present( as told by tc),
and this section is not part of ".text" nor ".bss". It was also seen that
the .text and the .rodata sections go into the same page( in the last talk).

I found the following on a mailing list :
What are the sections:
'.text' is code (not modifiable) (this could stay in ROM)
'.rodata' is data that is not modified. (this could stay in ROM)
'.data' is data that could be modified. (this must be placed in RAM)
'.bss' should be zero initialized (and placed in RAM)
the description of rodata is perfectly ok. But .rodata being present in the
same page as .text, where the page is marked "executable" is not acceptable.

tc, pep, u guys found something ?


-----Original Message-----
From: Peeyush Prasad [mailto:peeyush@xxxxxxxxxx]
Sent: Friday, April 23, 2004 3:27 PM
To: bitcompsci02@xxxxxxxxxxxxxxx; bit-bangalore_alumni@xxxxxxxxxxxxxxx;
Subject: [bitlug] BITLug: 'Mem mgmt' Sat,24 Apr,1200pm,BIT

hi ppl,
 Sorry for the '1200 ams' in the last coupla mails... you see, I just
forward previously sent mails!
-- P
                     BITLug presents
                   'Memory management'

 Date : Saturday,17th April, 2004
 Time : 12:00 pm
 Duration: 1.5 hrs
 Venue: BIT Seminar Hall, Bangalore Institute of Technology
 Speakers: Pavan TC, Motorola (pavan_tc@xxxxxxxxxxxxxx)
           Peeyush Prasad, Raman Research Institute (peeyush@xxxxxxxxxx)

Abstract :

 BITLug is BIT's first Linux Users group, and has already organised two
talks last year as part of its regular activities.
 We start off this year with a collection of talks which we call
                     'The OS Series'
The aim of this series is to familiarise the audience of the various
programming facilities offered by any modern OS. This is demonstrated by
building a sample application.
 The topics to be discussed include :
  File handling
  Memory Management
  Process management
We present memory management fundamentals,with concentration on the gcc
way of doing things, and look into the stack and heap implementations.We
discuss various hazards and tricks of managing user memory, along with
some C quirks.
 For more details, log on to www.rri.res.in/~peeyush/bitlug/index.html, or
mail the speakers.Please circulate this notice to anybody interested.
-- P

Other related posts: