8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-26 10:43:03 +01:00
firebird-mirror/src/jrd/all.h

74 lines
2.0 KiB
C
Raw Normal View History

2001-05-23 15:26:42 +02:00
/*
* PROGRAM: JRD Access Method
* MODULE: all.h
* DESCRIPTION: Block allocator blocks
*
* The contents of this file are subject to the Interbase Public
* License Version 1.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy
* of the License at http://www.Inprise.com/IPL.html
*
* Software distributed under the License is distributed on an
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
* or implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code was created by Inprise Corporation
* and its predecessors. Portions created by Inprise Corporation are
* Copyright (C) Inprise Corporation.
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
*/
2001-12-24 03:51:06 +01:00
#ifndef JRD_ALL_H
#define JRD_ALL_H
#include "../jrd/jrd.h"
#include "../common/classes/alloc.h"
2001-12-24 03:51:06 +01:00
#include "../jrd/block_cache.h"
#include "../jrd/lls.h"
2003-12-22 11:00:59 +01:00
TEXT* ALL_cstring(const TEXT* in_string);
2001-12-24 03:51:06 +01:00
void ALL_fini(void);
void ALL_init(void);
//void ALL_push(BLK , LLS *);
//BLK ALL_pop(LLS *);
struct blk;
class SparseBitmap;
class BitmapSegment;
class Database;
void ALL_print_memory_pool_info(IB_FILE*, Database*);
2001-12-24 03:51:06 +01:00
#ifdef DEV_BUILD
void ALL_check_memory(void);
2001-05-23 15:26:42 +02:00
#endif
2001-12-24 03:51:06 +01:00
class JrdMemoryPool : public MemoryPool
{
protected:
// Dummy constructor and destructor. Should never be called
JrdMemoryPool() : MemoryPool(NULL, NULL), lls_cache(*this) {}
~JrdMemoryPool() {}
2001-12-24 03:51:06 +01:00
public:
static JrdMemoryPool *createPool(int *cur_mem, int *max_mem);
static JrdMemoryPool *createPool();
2003-01-20 12:10:30 +01:00
static void deletePool(JrdMemoryPool* pool);
static void noDbbDeletePool(JrdMemoryPool* pool);
2001-12-24 03:51:06 +01:00
static blk* ALL_pop(class lls**);
static void ALL_push(blk*, class lls**);
2001-12-24 03:51:06 +01:00
SparseBitmap* plb_buckets; /* available bit map buckets */
BitmapSegment* plb_segments; /* available bit map segments */
class Dcc* plb_dccs;
2001-12-24 03:51:06 +01:00
private:
BlockCache<lls> lls_cache; /* Was plb_lls */
};
#endif // JRD_ALL_H