home *** CD-ROM | disk | FTP | other *** search
- Path: news.uit.no!news
- From: magneoe@stud.cs.uit.no (Magne Oestlyngen)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Start and end address of memory
- Date: 20 Apr 96 05:39:44 +0100
- Organization: University of Tromsoe, Norway
- Message-ID: <1366.6684T339T2226@stud.cs.uit.no>
- References: <923.6682T1203T241@login.eunet.no>
- NNTP-Posting-Host: uit-or2.uit.no
- X-Newsreader: THOR 2.22 (Amiga;TCP/IP)
-
- >This source:
- >printf("ln_Name = %s\n",SysBase->MemList.lh_TailPred->ln_Name);
- >printf("mh_Lower = $%x\n",((struct MemHeader*)SysBase->MemList.lh_TailPred)-
- >>mh_Lower);
- >printf("mh_Upper = $%x\n",((struct MemHeader*)SysBase->MemList.lh_TailPred)-
- >>mh_Upper);
- >Outputs:
- >ln_Name = chip memory
- >mh_Lower = $3020
- >mh_Upper = $200000
- >Now I have upper and lower bound of chip memory, but I want the start and stop
- >address. (meu_Addr and me_Length)
-
- length = upper - lower
-
- mh_Lower and mh_Upper _are_ the start and stop of your (allocatable) chipmem.
- Some (in your system, $3000) bytes are taken by exec before it is put in the
- freelist. The $20 bytes part, is the MemHeader.
-
- If you really want the _real_ chipmem location, it starts at address 0 and is
- SysBase->MaxLocMem bytes long.
-
- >Well.. Where are they. I cant find them anywhere in the SysBase->MemList.
- >Is the name a joke?
-
- MemList's ans MemEntry's are something different, and doesn't have anything
- to do with SysBase->MemList (Yes, the name is a little misleading, but
- execbase.h _does_ say it is a struct List and not a struct MemList).
-
-
- >.. Patrick Hanevold - VR developer - patrick.hanevold@login.eunet.no ///
-
- ----
- ______________________________________________________________
- Magne Oestlyngen <magneoe@stud.cs.uit.no>, IRC #amiga: Magneoe
- THOR homepage: http://www.cs.uit.no/~kjelli/thor.html
-
-