cs412044
2005-02-21 09:50:26 UTC
I'm up to Load_User_Program and have a couple of quick (I think) questions.
1) First, the initial goal is to:
"find the highest possible virtual address based on the segment base address
and memory size of that segment"
When it says 'the segment', which segment does it refer to? The last one?
That seems to make sense to me, that the last segments virtual address + its
size is the number we're looking for.
2) Then, in the hints senction we're told to:
"Determine where in memory each executable segment will be placed"
This sounds like a similar task to the one above, but I'm not sure if it's
the same (in which case I'm having trouble understanding what exactly to do)
or if perhaps they're 2 different things (in whch case it would seem we
first find the amound of space to allocate, and then later make the segment
placement determination for *each* segment when we're placing them into
memory).
3) Lastly, how exactly do we allocate space for something in memory? People
seem to be talking about something called "malloc" wh\hich may or may not
have anything to do with this. I'm not sure if this is a difference between
the C++ I learned and the C we're programming, but I'm used to using 'new'.
Thanks,
Jason
1) First, the initial goal is to:
"find the highest possible virtual address based on the segment base address
and memory size of that segment"
When it says 'the segment', which segment does it refer to? The last one?
That seems to make sense to me, that the last segments virtual address + its
size is the number we're looking for.
2) Then, in the hints senction we're told to:
"Determine where in memory each executable segment will be placed"
This sounds like a similar task to the one above, but I'm not sure if it's
the same (in which case I'm having trouble understanding what exactly to do)
or if perhaps they're 2 different things (in whch case it would seem we
first find the amound of space to allocate, and then later make the segment
placement determination for *each* segment when we're placing them into
memory).
3) Lastly, how exactly do we allocate space for something in memory? People
seem to be talking about something called "malloc" wh\hich may or may not
have anything to do with this. I'm not sure if this is a difference between
the C++ I learned and the C we're programming, but I'm used to using 'new'.
Thanks,
Jason