Go to the first, previous, next, last section, table of contents.


3.1.4 diskheap_store -- Store a buffer of bytes in the heap

Function:
int diskheap_store(diskheap_t *diskheap_p, const void *buffer, const unsigned int user_size, const unsigned int user_type, unsigned int *block_num_p, unsigned int *offset_p)

Usage: ret = diskheap_store(diskheap_p, "hello there", 11 /* size of string */, 0 /* no type specified */, &block_num, &offset);

This function stores a buffer of bytes into the diskheap returning the block-number and offset location where it was written. You will need to record the block-number and offset location information somewhere so you can retrieve or delete this space from the heap later. It will return DISKHEAP_ERROR_NONE if it succeeds otherwise an error code.


Go to the first, previous, next, last section, table of contents.

Diskheap Home Page. Copyright 2002 by Gray Watson