Mercurial > hg > CbC > old > DPP
view memory.h @ 12:7f2db1e1bf2f default tip
use CBC_COMPILER environment val
author | anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 04 Jul 2019 18:53:38 +0900 |
parents | d4bc23cb728b |
children |
line wrap: on
line source
#ifndef _MEMORY_H_ #define _MEMORY_H_ typedef struct memory { void *adr; int length; void *body; int hash; struct memory *left,*right; } Memory, *MemoryPtr; extern void die_exit(char *); extern MemoryPtr create_memory(void *adr, int length); extern void compute_memory_hash1(MemoryPtr m); extern void free_memory(MemoryPtr m); extern int cmp_content(MemoryPtr a,MemoryPtr b); extern int cmp_memory(MemoryPtr a,MemoryPtr b); extern MemoryPtr copy_memory(MemoryPtr m, MemoryPtr *db); extern void restore_memory(MemoryPtr m) ; extern int get_memory_hash(MemoryPtr m, int hash); MemoryPtr add_memory(void *ptr,int length, MemoryPtr *parent); extern int memory_lookup(MemoryPtr m, MemoryPtr *parent, MemoryPtr (*new_memory)(MemoryPtr), MemoryPtr *out); extern MemoryPtr add_memory_range(void *ptr,int length, MemoryPtr *parent); extern int memory_range_lookup(MemoryPtr m, MemoryPtr *parent, MemoryPtr *out); extern void memory_usage(); #endif /* end */