156 Chapter 7
133 {
134 // Free slot found, allocate the space
135 bit_array_used[i] = true;
136 return(bit_array_mem[i]);
137 }
138 }
139 std::cout << "Error: Out of local memory\n";
140 exit (8);
141 }
142
143 /************************************************
144 * fast_bit_array -- delete *
145 * *
146 * Quickly free the space used by a *
147 * fast bit array. *
148 ************************************************/
149 void fast_bit_array::operator delete(
150 void *ptr // Pointer to the space to return
151 )
152 {
153 int i; // Slot index
154
155 for (i = 0; i < N_FAST_BIT_ARRAYS; ++i)
156 {
157 // Is this the right slot
158 if (ptr == bit_array_mem[i])
159 {
160 // Right slot, free it
161 bit_array_used[i] = false;
162 return;
163 }
164 }
165 std::cout <<
166 "Error: ...