Method of managing memory database space by using bitmap
A database and bitmap technology, applied in the management field of in-memory database systems, can solve the problems of reducing system reliability and maintainability, reducing memory space utilization, and low overall space management efficiency, so as to improve multi-task performance, memory The effect of high space utilization and good scalability
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0101] Example 1, such as image 3 As shown, in a typical application scenario, the complete process of initializing and allocating a data page includes the following steps:
[0102] Step A1: It is set in the database system configuration that m MB of memory will be used, where m is a positive integer; and the host supports memory allocation of this capacity. At the same time, set the size of each page as p KB; where, p is a positive integer.
[0103] Step B1: After the database system is started, allocate m by opening up shared memory or similar methods
[0104] MB memory. Assume that the first address of the memory segment is g, where g is a natural number.
[0105] Step C1: Calculate the required primary bitmap area size b1=(m*1024) / (p*8), unit byte.
[0106] Step D1: reserve b1 byte space at the beginning of the total memory segment as a first-level bitmap area, and initialize the bitmap area to all 0s.
[0107] Step E1: Allocate space for the first-level bitmap auxil...
Embodiment 2
[0115] Example 2, such as Figure 4 As shown, in a typical application scenario, the complete process of applying for a record space includes the following steps:
[0116] Step A2: The upper layer business sends a request to apply for a record space in the nth data page.
[0117] Step B2: Locate the first address of the secondary bitmap area of the data page according to the algorithm of steps I1 and J1, find the first available bit in this area according to a certain algorithm, if found, set it to 1, indicating that it has been allocated, and Return success; if not found, go to step C2.
[0118] Step C2: Return the error message "No space left on this page" to the caller
Embodiment 3
[0119] Example 3, such as Figure 5 As shown, in a typical application scenario, the complete process of releasing a record space includes the following steps:
[0120] Step A3: The upper layer business sends a request to release the nth record space in the mth data page. Among them, m and n are natural numbers.
[0121] Step B3: Locate the first address of the secondary bitmap area of the data page according to the algorithm of steps I1 and J1, locate the nth bit, and set it to 0, indicating that it has been recycled, and return successfully; if not found, go to Step C3.
[0122] Step C3: return the error message "page number or record number is illegal" to the caller.
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com