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/gc/heap-input.h
ViewVC logotype

Annotation of /sml/trunk/src/runtime/gc/heap-input.h

Parent Directory Parent Directory | Revision Log Revision Log


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

1 : monnier 249 /* heap-input.h
2 :     *
3 :     * COPYRIGHT (c) 1993 by AT&T Bell Laboratories.
4 :     *
5 :     */
6 :    
7 :     #ifndef _HEAP_INPUT_
8 :     #define _HEAP_INPUT_
9 :    
10 :     #include <stdio.h>
11 :    
12 :     #ifndef _ADDR_HASH_
13 :     #include "addr-hash.h"
14 :     #endif
15 :    
16 :     typedef struct { /* An input source for reading heap data. We need */
17 :     /* this because the blaster may need to read from a */
18 :     /* stream that has already had characters read from it. */
19 :     bool_t needsSwap; /* true, if the input bytes need to be swapped */
20 :     FILE *file; /* the file descriptor to read from, once the */
21 :     /* buffered characters are exhausted */
22 :     Byte_t *base; /* the start of the bufferec characters */
23 :     Byte_t *buf; /* the current position in the buffer */
24 :     long nbytes;
25 :     } inbuf_t;
26 :    
27 :    
28 :     /** Big-object relocation info **/
29 :    
30 :     typedef struct { /* big-object relocation info */
31 :     Addr_t oldAddr;
32 :     bigobj_desc_t *newObj;
33 :     } bo_reloc_t;
34 :    
35 :     typedef struct { /* big-object region relocation info */
36 :     Addr_t firstPage; /* the address of the first page of the region */
37 :     int nPages; /* the number of pages in the region */
38 :     bo_reloc_t **objMap; /* the map from pages to big-object relocation */
39 :     /* info. */
40 :     } bo_region_reloc_t;
41 :    
42 :     /* Big-object region hash table interface */
43 :     #define LookupBORegion(tbl, bibopIndex) \
44 :     ((bo_region_reloc_t *)AddrTblLookup(tbl, BIBOP_INDEX_TO_ADDR(bibopIndex)))
45 :    
46 :     /* Utility routines */
47 :     extern ml_val_t *HeapIO_ReadExterns (inbuf_t *bp);
48 :     extern status_t HeapIO_Seek (inbuf_t *bp, long offset);
49 :     extern status_t HeapIO_ReadBlock (inbuf_t *bp, void *blk, long len);
50 :    
51 :     #endif /* !_HEAP_INPUT_ */

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