View source code
Display the source code in std/experimental/allocator/typed.d from which this
page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a
Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
local clone.
Enum std.experimental.allocator.typed.AllocFlag
Allocation-related flags dictated by type characteristics. TypedAllocator
deduces these flags from the type being allocated and uses the appropriate
allocator accordingly.
enum AllocFlag
: uint { ... }
Enum members
Name | Description |
---|---|
fixedSize
|
Fixed-size allocation (unlikely to get reallocated later). Examples: int ,
double , any struct or class type. By default it is assumed that the
allocation is variable-size, i.e. susceptible to later reallocation
(for example all array types). This flag is advisory, i.e. in-place resizing
may be attempted for fixedSize allocations and may succeed. The flag is
just a hint to the compiler it may use allocation strategies that work well
with objects of fixed size.
|
hasNoIndirections
|
The type being allocated embeds no pointers. Examples: int , int[] , Tuple!(int, float) . The implicit conservative assumption is that the type
has members with indirections so it needs to be scanned if garbage
collected. Example of types with pointers: int*[] , Tuple!(int,
string) .
|
immutableShared
|
By default it is conservatively assumed that allocated memory may be cast
to shared , passed across threads, and deallocated in a different thread
than the one that allocated it. If that's not the case, there are two
options. First, immutableShared means the memory is allocated for
immutable data and will be deallocated in the same thread it was
allocated in. Second, threadLocal means the memory is not to be shared
across threads at all. The two flags cannot be simultaneously present.
|
threadLocal
|
By default it is conservatively assumed that allocated memory may be cast
to shared , passed across threads, and deallocated in a different thread
than the one that allocated it. If that's not the case, there are two
options. First, immutableShared means the memory is allocated for
immutable data and will be deallocated in the same thread it was
allocated in. Second, threadLocal means the memory is not to be shared
across threads at all. The two flags cannot be simultaneously present.
|
Authors
License
Copyright © 1999-2024 by the D Language Foundation | Page generated by ddox.