[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

1833.0. "free chain blues" by AKOV03::IFSDEV () Fri Oct 28 1988 16:27

    			<printing free chain>
    
    I'm trying to write a callable C function to print the current
    free chain. I think I could do it, from the available documentation,
    if I could figure out how to address ExecBase.
    
    Am I missing something obvious? Is this covered in another note?
    Is there a Fish disk with a function or program like this?
    
    Thanks for your replies.
    
    Ken
T.RTitleUserPersonal
Name
DateLines
1833.1WJG::GUINEAUFri Oct 28 1988 17:5212
It's an extern.

Something like

extern struct ExecBase *Execbase

then Execbase->MemList  (sp?) points to the free memory list

Look in the C compiler manual.

John
1833.2AbsExecBase is location 4TLE::RMEYERSRandy MeyersSat Oct 29 1988 00:3719
Re: .0, .1

The name of the symbol is AbsExecBase as in:

#include <exec/execbase.h>

extern struct ExecBase *AbsExecBase;

AbsExecBase is the only absolute address in the machine.  It is at
absolute location 4.

Please note:  If you plan on walking the memory map, you should disable
task switching using Forbid() and re-enable it after walking the list
using Permit().  This prevents another task from performing memory
allocation as you walk the list and causing you to follow a pointer
to nowhere.

You should use Forbid() and Permit() whenever you walk any dynamically
updated system data structures like the memory, device nodes, etc.
1833.3thanksAKOV03::IFSDEVMon Oct 31 1988 11:573
    Thanks very much for your prompt help! I'll give it a shot!
    
    Ken