Skip to content

Commit bdcf83a

Browse files
devdev
authored andcommitted
Added small performance improvement
1 parent cce81f2 commit bdcf83a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/internal/datatype_allocator.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,10 @@ void allocator_destroy(struct SwiftNetMemoryAllocator* const memory_allocator) {
295295
for (uint32_t byte = 0; byte < bytes; byte++) {
296296
uint8_t mask = current_stack->ptr_status[byte];
297297

298+
if (mask == 0x00) {
299+
continue;
300+
}
301+
298302
for (uint8_t bit = 0; bit < 8; bit++) {
299303
uint32_t idx = byte * 8 + bit;
300304
if (idx >= total_items) break;

0 commit comments

Comments
 (0)