@@ -44,14 +44,14 @@ class NodeFactory {
4444 // / The end of the current slab.
4545 char *End = nullptr ;
4646
47- struct Slab {
47+ struct AllocatedSlab {
4848 // The previously allocated slab.
49- Slab *Previous;
49+ AllocatedSlab *Previous;
5050 // Tail allocated memory starts here.
5151 };
5252
5353 // / The head of the single-linked slab list.
54- Slab *CurrentSlab = nullptr ;
54+ AllocatedSlab *CurrentSlab = nullptr ;
5555
5656 // / The size of the previously allocated slab. This may NOT be the size of
5757 // / CurrentSlab, in the case where a checkpoint has been popped.
@@ -66,7 +66,7 @@ class NodeFactory {
6666 & ~((uintptr_t )Alignment - 1 ));
6767 }
6868
69- static void freeSlabs (Slab *slab);
69+ static void freeSlabs (AllocatedSlab *slab);
7070
7171 // / If not null, the NodeFactory from which this factory borrowed free memory.
7272 NodeFactory *BorrowedFrom = nullptr ;
@@ -149,8 +149,8 @@ class NodeFactory {
149149 // No. We have to malloc a new slab.
150150 // We double the slab size for each allocated slab.
151151 SlabSize = std::max (SlabSize * 2 , ObjectSize + alignof (T));
152- size_t AllocSize = sizeof (Slab ) + SlabSize;
153- Slab *newSlab = (Slab *)malloc (AllocSize);
152+ size_t AllocSize = sizeof (AllocatedSlab ) + SlabSize;
153+ AllocatedSlab *newSlab = (AllocatedSlab *)malloc (AllocSize);
154154
155155 // Insert the new slab in the single-linked list of slabs.
156156 newSlab->Previous = CurrentSlab;
@@ -225,7 +225,7 @@ class NodeFactory {
225225 // / A checkpoint which captures the allocator's state at any given time. A
226226 // / checkpoint can be popped to free all allocations made since it was made.
227227 struct Checkpoint {
228- Slab *Slab;
228+ AllocatedSlab *Slab;
229229 char *CurPtr;
230230 char *End;
231231 };
0 commit comments