Back to index

plt-scheme  4.2.1
vm_osk.c File Reference
#include <oskit/c/malloc.h>

Go to the source code of this file.


static voidvm_malloc_pages (VM *vm, size_t len, size_t alignment, int dirty_ok)
static void vm_free_pages (VM *vm, void *p, size_t len)
static void vm_flush_freed_pages (VM *vm)
static unsigned long determine_max_heap_size (void)

Function Documentation

static unsigned long determine_max_heap_size ( void  ) [static]

Definition at line 37 of file vm_osk.c.

  GCPRINT(GCOUTF, "Don't know how to get heap size for OSKit: assuming 1GB\n");
  return (1 * 1024 * 1024 * 1024);
static void vm_flush_freed_pages ( VM vm) [static]

Definition at line 32 of file vm_osk.c.

static void vm_free_pages ( VM vm,
void p,
size_t  len 
) [static]

Definition at line 26 of file vm_osk.c.

  vm_memory_allocated_dec(vm, len);
  sfree(p, len);

Here is the call graph for this function:

static void* vm_malloc_pages ( VM vm,
size_t  len,
size_t  alignment,
int  dirty_ok 
) [inline, static]

Definition at line 12 of file vm_osk.c.

  void *p;

  p = smemalign(alignment, len);
  if (!dirty_ok)
  memset(p, 0, len);

  vm_memory_allocated_inc(vm, len);

  return p;

Here is the call graph for this function: