Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Pascal Borland > How to determin...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 15 Topic 1089 of 1102
Post > Topic >>

How to determine contents of data segment?

by Jim Leonard <MobyGamer@[EMAIL PROTECTED] > Feb 26, 2008 at 04:55 PM

I compile most of my code at the command-line, and I'm writing a new
code base that, for reasons I can't determine, is stuffing a lot into
the data segment.  For example, compiling a "hello world"-type of
program will result in something like:

20 lines, 9.3 seconds, 4000 bytes code, 3000 bytes data.

It's the "3000 bytes data" part that is driving me nuts.  I've gone
over the code over and over again and I'm allocating nearly everything
on the heap (ie. no static VARs) so I honestly can't figure out what
the heck the compiler is stuffing into the data segment.

I tried pulling up the executable with embedded debug info into Turbo
Debugger and doing a View->Variables and looking through the list, but
I can't see anything obvious in there that would account for nearly
half of an empty program's size crammed into the data segment.  I've
generated a detailed .MAP but there's only a single line in there that
has DATA and it only tells me how large it is.

Is there some way to see what is taking up the data segment?




 15 Posts in Topic:
How to determine contents of data segment?
Jim Leonard <MobyGamer  2008-02-26 16:55:52 
Re: How to determine contents of data segment?
Jim Leonard <MobyGamer  2008-02-26 21:26:27 
Re: How to determine contents of data segment?
Marco van de Voort <ma  2008-02-27 07:37:45 
Re: How to determine contents of data segment?
Klaus Jorgensen <kj@[E  2008-02-27 13:12:46 
Re: How to determine contents of data segment?
Robert Riebisch <Rober  2008-02-27 21:59:34 
Re: How to determine contents of data segment?
Jim Leonard <MobyGamer  2008-02-29 09:33:14 
Re: How to determine contents of data segment?
Klaus Jorgensen <kj@[E  2008-02-29 21:42:09 
Re: How to determine contents of data segment?
Jim Leonard <MobyGamer  2008-03-03 12:10:43 
Re: How to determine contents of data segment?
Jim Leonard <MobyGamer  2008-03-03 12:59:08 
Re: How to determine contents of data segment?
Robert Riebisch <Rober  2008-03-03 22:15:17 
Re: How to determine contents of data segment?
Jim Leonard <MobyGamer  2008-03-03 17:16:12 
Re: How to determine contents of data segment?
Klaus Jorgensen <kj@[E  2008-03-04 08:05:18 
Re: How to determine contents of data segment?
Jim Leonard <MobyGamer  2008-03-04 07:30:04 
Re: How to determine contents of data segment?
Jim Leonard <MobyGamer  2008-03-05 07:12:53 
Re: How to determine contents of data segment?
Klaus Jorgensen <kj@[E  2008-03-05 18:05:23 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed May 14 0:41:21 CDT 2008.