Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/src/runtime/include/memory.h
ViewVC logotype

Annotation of /sml/trunk/src/runtime/include/memory.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 249 - (view) (download) (as text)
Original Path: sml/branches/SMLNJ/src/runtime/include/memory.h

1 : monnier 249 /* memory.h
2 :     *
3 :     * COPYRIGHT (c) 1992 AT&T Bell Laboratories
4 :     *
5 :     * An OS independent view of memory. This supports allocation of
6 :     * memory objects aligned to BIBOP_PAGE_SZB byte boundries (see bibop.h).
7 :     */
8 :    
9 :     #ifndef _MEMORY_
10 :     #define _MEMORY_
11 :    
12 :     /* The header of a mem_obj_t structure. The full representation
13 :     * of this depends on the underlying OS memory system, and thus is
14 :     * abstract.
15 :     */
16 :     struct mem_obj_hdr {
17 :     Addr_t base; /* the base address of the object. */
18 :     Addr_t sizeB; /* the object's size (in bytes) */
19 :     };
20 :    
21 :     typedef struct mem_obj mem_obj_t;
22 :    
23 :     extern void MEM_InitMemory ();
24 :     extern mem_obj_t *MEM_AllocMemObj (Word_t szb);
25 :     extern void MEM_FreeMemObj (mem_obj_t *obj);
26 :    
27 :     #define MEMOBJ_BASE(objPtr) (((struct mem_obj_hdr *)(objPtr))->base)
28 :     #define MEMOBJ_SZB(objPtr) (((struct mem_obj_hdr *)(objPtr))->sizeB)
29 :    
30 :     #ifdef _VM_STATS_
31 :     extern long MEM_GetVMSize ();
32 :     #endif
33 :    
34 :     #endif /* !_MEMORY_ */
35 :    

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0