Patent ID: 8281103
Filing Date: 2012-10-02
Classification: G06F

Abstract:
1. A method for allocating storage addresses, comprising: receiving a request for storage address allocation; searching a level-2 bitmap in a hierarchical bitmap in bidirectional mode, wherein the hierarchical bitmap includes N level-1 bitmaps and the level-2 bitmap, and each level-1 bitmap includes M bits, and each bit of the level-1 bitmap corresponds to a storage address and indicates the idle state of the corresponding storage address; the level-2 bitmap includes N bits corresponding to the N level-1 bitmaps, and each bit of the level-2 bitmap indicates whether the corresponding level-1 bitmap has an idle storage address; M and N are integers greater than 1; outputting an idle bit according to the result of searching in the level-2 bitmap; and obtaining a storage address corresponding to the output idle bit of the level-2 bitmap, and allocating the obtained storage address; wherein the method further comprises: searching each level-1 bitmap in bidirectional mode, and updating a corresponding bit in the level-2 bitmap according to the result of searching in the level-1 bitmap.