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

SCM Repository

[smlnj] View of /sml/trunk/src/runtime/include/bibop.h
ViewVC logotype

View of /sml/trunk/src/runtime/include/bibop.h

Parent Directory Parent Directory | Revision Log Revision Log

Revision 250 - (download) (as text) (annotate)
Sat Apr 17 18:57:03 1999 UTC (21 years, 2 months ago) by monnier
File size: 1030 byte(s)
This commit was generated by cvs2svn to compensate for changes in r249,
which included commits to RCS files with non-trunk default branches.
/* bibop.h
 * COPYRIGHT (c) 1994 AT&T Bell Laboratories.
 * The BIBOP maps memory pages to page IDs.  The interpretation of most
 * of these IDs is defined by the GC (see ../gc/arena-id.h), but the
 * IDs for unmapped memory are defined here.

#ifndef _BIBOP_
#define _BIBOP_

typedef Unsigned16_t page_id_t;

#define PAGEID_unmapped	0xffff

#define isUNMAPPED(ID)	((ID) == PAGEID_unmapped)

/** The BIBOP **/


#  error two level BIBOP mapping not implemented

typedef page_id_t **bibop_t;


#define BIBOP_SHIFT		16		/* log2(BIBOP_PAGE_SZB) */
#define BIBOP_SZ		(1<<BIBOP_BITS)
#define BIBOP_ADDR_TO_INDEX(a)	(((Addr_t)(a))>>BIBOP_SHIFT)

#define BIBOP_INDEX_TO_ADDR(i)	((Addr_t)((i) << BIBOP_SHIFT))
#define BIBOP_NBLKS_TO_SZB(i)	((Addr_t)((i) << BIBOP_SHIFT))

typedef page_id_t *bibop_t;

extern bibop_t        BIBOP;

#define ADDR_TO_PAGEID(bibop,a)	((bibop)[BIBOP_ADDR_TO_INDEX(a)])

#endif /* !TWO_LEVEL_MAP */

#endif /* !_BIBOP_ */

ViewVC Help
Powered by ViewVC 1.0.0