2004-07-06 20:59:36 +00:00
|
|
|
/**
|
|
|
|
@file
|
|
|
|
|
2005-01-20 21:19:47 +00:00
|
|
|
Allocates and deallocates records.
|
|
|
|
|
|
|
|
@todo Talloc() should reuse space freed by Tdealloc(), but
|
|
|
|
currently just leaks it.
|
|
|
|
|
2004-07-06 20:59:36 +00:00
|
|
|
@ingroup OPERATIONS
|
|
|
|
|
|
|
|
$Id$
|
|
|
|
*/
|
|
|
|
|
2005-01-20 21:19:47 +00:00
|
|
|
|
|
|
|
#ifndef __ALLOC_H
|
|
|
|
#define __ALLOC_H 1
|
|
|
|
|
2004-06-24 21:10:31 +00:00
|
|
|
Operation getAlloc();
|
|
|
|
Operation getDealloc();
|
2004-10-02 07:29:34 +00:00
|
|
|
Operation getRealloc();
|
2004-07-06 20:59:36 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Allocate a record.
|
|
|
|
|
2005-01-21 02:13:17 +00:00
|
|
|
@param xid The transaction responsible for the allocation
|
|
|
|
@param size The size of the new record to be allocated. Talloc will allocate a
|
|
|
|
blob if the record will not easily fit on a page.
|
2005-01-20 21:19:47 +00:00
|
|
|
|
|
|
|
@return the recordid of the new record.
|
2004-07-06 20:59:36 +00:00
|
|
|
*/
|
2004-07-06 01:22:18 +00:00
|
|
|
recordid Talloc(int xid, long size);
|
2004-07-06 20:59:36 +00:00
|
|
|
|
2005-01-20 21:19:47 +00:00
|
|
|
/**
|
|
|
|
Free a record.
|
|
|
|
@todo Currently, we just leak store space on dealloc.
|
|
|
|
*/
|
2004-06-24 21:10:31 +00:00
|
|
|
void Tdealloc(int xid, recordid rid);
|
|
|
|
|
2005-01-20 21:19:47 +00:00
|
|
|
/**
|
|
|
|
Return the type of a record, as returned by getRecordType.
|
|
|
|
|
|
|
|
@todo document TrecordType
|
|
|
|
@see getRecordType
|
|
|
|
|
|
|
|
*/
|
2004-12-01 01:26:25 +00:00
|
|
|
int TrecordType(int xid, recordid rid);
|
|
|
|
|
2004-06-24 21:10:31 +00:00
|
|
|
#endif
|