* _bitmap_free_tidbuf() -- release the space. */
| 2099 | * _bitmap_free_tidbuf() -- release the space. |
| 2100 | */ |
| 2101 | static uint16 |
| 2102 | _bitmap_free_tidbuf(BMTIDBuffer* buf) |
| 2103 | { |
| 2104 | uint16 bytes_freed = 0; |
| 2105 | |
| 2106 | if (buf->last_tids) |
| 2107 | pfree(buf->last_tids); |
| 2108 | if (buf->cwords) |
| 2109 | pfree(buf->cwords); |
| 2110 | |
| 2111 | bytes_freed = buf->num_cwords * sizeof(BM_HRL_WORD) + |
| 2112 | buf->num_cwords * sizeof(uint64); |
| 2113 | |
| 2114 | buf->num_cwords = 0; |
| 2115 | buf->curword = 0; |
| 2116 | /* Paranoia */ |
| 2117 | MemSet(buf->hwords, 0, sizeof(BM_HRL_WORD) * BM_NUM_OF_HEADER_WORDS); |
| 2118 | |
| 2119 | return bytes_freed; |
| 2120 | } |
| 2121 | |
| 2122 | /* |
| 2123 | * insertsetbit() -- insert a given set bit into a bitmap |
no test coverage detected