PIPS
kernel_memory_mapping.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "genC.h"
#include "kernel_memory_mapping.h"
+ Include dependency graph for kernel_memory_mapping.c:

Go to the source code of this file.

Functions

memory_mapping copy_memory_mapping (memory_mapping p)
 MEMORY_MAPPING. More...
 
void free_memory_mapping (memory_mapping p)
 
memory_mapping check_memory_mapping (memory_mapping p)
 
bool memory_mapping_consistent_p (memory_mapping p)
 
bool memory_mapping_defined_p (memory_mapping p)
 
list gen_memory_mapping_cons (memory_mapping p, list l)
 
void memory_mapping_assign_contents (memory_mapping r, memory_mapping v)
 
void memory_mapping_non_recursive_free (memory_mapping p)
 
void write_memory_mapping (FILE *f, memory_mapping p)
 
memory_mapping read_memory_mapping (FILE *f)
 
memory_mapping make_memory_mapping (set a)
 

Function Documentation

◆ check_memory_mapping()

memory_mapping check_memory_mapping ( memory_mapping  p)

Definition at line 22 of file kernel_memory_mapping.c.

22  {
24 }
gen_chunk * gen_check(gen_chunk *obj, int t)
GEN_CHECK checks that the gen_chunk received OBJ is of the appropriate TYPE.
Definition: genClib.c:2356
#define memory_mapping_domain
newgen_entity_domain_defined
A gen_chunk is used to store every object.
Definition: genC.h:58

References gen_check(), and memory_mapping_domain.

Referenced by memory_mapping_assign_contents(), and memory_mapping_consistent_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ copy_memory_mapping()

memory_mapping copy_memory_mapping ( memory_mapping  p)

MEMORY_MAPPING.

Definition at line 16 of file kernel_memory_mapping.c.

16  {
17  return (memory_mapping) gen_copy_tree((gen_chunk*) p);
18 }
gen_chunk * gen_copy_tree(gen_chunk *obj)
Definition: genClib.c:1429

References gen_copy_tree().

+ Here is the call graph for this function:

◆ free_memory_mapping()

void free_memory_mapping ( memory_mapping  p)

Definition at line 19 of file kernel_memory_mapping.c.

19  {
20  gen_free((gen_chunk*) p);
21 }
void gen_free(gen_chunk *obj)
version without shared_pointers.
Definition: genClib.c:992

References gen_free().

+ Here is the call graph for this function:

◆ gen_memory_mapping_cons()

list gen_memory_mapping_cons ( memory_mapping  p,
list  l 
)

Definition at line 32 of file kernel_memory_mapping.c.

32  {
34 }
list gen_typed_cons(_int type, const void *item, const list next)
CONS a list with minimal type checking this cannot be done within the CONS macro because possible fun...
Definition: list.c:900
#define MEMORY_MAPPING_NEWGEN_DOMAIN

References gen_typed_cons(), and MEMORY_MAPPING_NEWGEN_DOMAIN.

+ Here is the call graph for this function:

◆ make_memory_mapping()

memory_mapping make_memory_mapping ( set  a)

Definition at line 52 of file kernel_memory_mapping.c.

52  {
54 }
#define GEN_CHECK_ALLOC
Definition: genC.h:307
gen_chunk * gen_alloc(int size, int gen_check_p, int dom,...)
allocates something in newgen.
Definition: genClib.c:298

References gen_alloc(), GEN_CHECK_ALLOC, and memory_mapping_domain.

Referenced by kernel_data_mapping().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ memory_mapping_assign_contents()

void memory_mapping_assign_contents ( memory_mapping  r,
memory_mapping  v 
)

Definition at line 35 of file kernel_memory_mapping.c.

35  {
38  message_assert("defined references to domain memory_mapping",
40  memcpy(r, v, sizeof(struct _newgen_struct_memory_mapping_));
41 }
memory_mapping check_memory_mapping(memory_mapping p)
bool memory_mapping_defined_p(memory_mapping p)
#define message_assert(msg, ex)
Definition: newgen_assert.h:47

References check_memory_mapping(), memory_mapping_defined_p(), and message_assert.

+ Here is the call graph for this function:

◆ memory_mapping_consistent_p()

bool memory_mapping_consistent_p ( memory_mapping  p)

Definition at line 25 of file kernel_memory_mapping.c.

25  {
27  return gen_consistent_p((gen_chunk*) p);
28 }
int gen_consistent_p(gen_chunk *obj)
GEN_CONSISTENT_P dynamically checks the type correctness of OBJ.
Definition: genClib.c:2398

References check_memory_mapping(), and gen_consistent_p().

+ Here is the call graph for this function:

◆ memory_mapping_defined_p()

bool memory_mapping_defined_p ( memory_mapping  p)

Definition at line 29 of file kernel_memory_mapping.c.

29  {
30  return gen_defined_p((gen_chunk*) p);
31 }
int gen_defined_p(gen_chunk *obj)
Definition: genClib.c:2438

References gen_defined_p().

Referenced by memory_mapping_assign_contents().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ memory_mapping_non_recursive_free()

void memory_mapping_non_recursive_free ( memory_mapping  p)

Definition at line 42 of file kernel_memory_mapping.c.

42  {
43  // should clear up contents...
44  free(p);
45 }
void free(void *)

References free().

+ Here is the call graph for this function:

◆ read_memory_mapping()

memory_mapping read_memory_mapping ( FILE *  f)

Definition at line 49 of file kernel_memory_mapping.c.

49  {
50  return (memory_mapping) gen_read(f);
51 }
gen_chunk * gen_read(FILE *file)
GEN_READ reads any object from the FILE stream.
Definition: genClib.c:2323
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
Definition: offsets.c:15

References f(), and gen_read().

+ Here is the call graph for this function:

◆ write_memory_mapping()

void write_memory_mapping ( FILE *  f,
memory_mapping  p 
)

Definition at line 46 of file kernel_memory_mapping.c.

46  {
47  gen_write(f, (gen_chunk*) p);
48 }
void gen_write(FILE *fd, gen_chunk *obj)
GEN_WRITE writes the OBJect on the stream FD.
Definition: genClib.c:1745

References f(), and gen_write().

+ Here is the call graph for this function: