Skip to content

[alloc] Change DebugCheckingAllocator to support concurrent operations (0.2) - #104

Merged
williamwutq merged 2 commits into
0.2-backportsfrom
0.2-debug-checking
Oct 30, 2026
Merged

williamwutq merged 2 commits into
0.2-backportsfrom
0.2-debug-checking

Conversation

@williamwutq

Copy link
Copy Markdown
Owner

Description:

When its inner allocator is Sync, the wrapper can be shared across threads without external synchronization; the entire lifespan of operations through it are serialized under one Mutex, owned by the DebugCheckingAllocator wrapper itself, so its overlap and double-free checks stay exact.

Previously, DebugCheckingAllocator supported Sync while its docs explicitly said that it does not support concurrent operations. This is fixed now.

This should not significantly affect performance.

Follows #103

Important Feature: No
Type: Allocator - Fix; Debug-Checking
Breaking change: No
Tests: Included
Feature Flags: alloc + debug_checking
New Types: None
Rust Only: Yes
Fuzz: Not needed
Safety Review: Invariants, Concurrency

Previously, `DebugCheckingAllocator` supported `Sync` while its docs explicitly said that it does not support concurrent operations. This is fixed now.

Backported from 0.4.x lane
@williamwutq williamwutq self-assigned this Oct 28, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@williamwutq
williamwutq merged commit 01135ad into 0.2-backports Oct 30, 2026
20 checks passed
@williamwutq
williamwutq deleted the 0.2-debug-checking branch October 30, 2026 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant