| Commit message (Collapse) | Author | Age | Files | Lines |
| |\
| |
| | |
Add `slice.suffix_length`
|
| | | |
|
| |/ |
|
| | |
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| | |
This patch takes the former debug message output of a test changing its
state and makes it its own feature, toggleable with the
`ODIN_TEST_LOG_STATE_CHANGES` configurable. The output will be at the
info level and is disabled by default.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In #5399 it was noticed, that IPC_Mode isn't being used within SystemV
IPC procedures, even though it was designed this way, which lead to a
weird API where in order to call SystemV IPC procedures multiple
transmutes and a bitwise-OR are needed.
This unifies IPC_Mode and IPC_Flags bitsets, making it possible to call
the SystemV IPC procedures without extra casts, and rearranges the flags
in a way that hopefully makes it easier to see when they are not
colliding and should not be mixed. The explanation, explaining this
arrangement of the enum was added.
The IPC_Perm structure is modified, so that the flags can be re-used
between the calls. It's probably not as good as keeping them separate,
but should work... hopefully.
Kept the "old" style of documentation for consistency.
Signed-off-by: Sunagatov Denis <thebumboni@gmail.com>
|
| | |\
| | |
| | | |
Fix memory leak in `core:math/big.internal_rat_norm`
|
| | | | |
|
| | |/ |
|
| | | |
|
| | | |
|
| | |\
| | |
| | | |
chan: fix try_send and send
|
| | | |
| | |
| | |
| | |
| | |
| | | |
This fixes an issue where a call to close could intercept the dance
between send and recv, causing send to report incorrectly that a value
was not transmitted (when it actually was).
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit makes send behave the same as recv: that the call will
return false if the channel is closed while a thread is waiting on the
blocking operation.
Prior logic would have send return true even if the channel was actually
closed rather than read from.
Docs adjusted to make this clear.
Tests added to lock in this behaviour.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This changes the semantics of try_send to be consistently non-blocking.
That is, if the buffered is full OR there are no readers it returns
false.
The previous behaviour was such that it would block in the latter case
of no reader, and it would wait for a reader. That is problematic
because it produces inconsistent behaviour between buffered and
unbuffered channels which is astonishing and adds complexity to the
caller.
To illustrate the problem with the old behaviour, consider the
try_select operation: if a send-channel happens to be unbuffered the
try_select (which wants to never block) can now block, that unbuffered
send channel is selected (at random) and there is no reader on the other
side. Thus we have unpredictable blocking behaviour, which breaks the
guarantee that try_select never blocks.
If you want a blocking send you can just call "send" (the blocking
variant).
In addition, there is some reader/writer math done inside
can_{send,recv} such that they only report true if there is sufficient
reader/writer capacity. If there is contention we need to ensure that
each reader is paired to exactly one writer.
Consider try_send: if there is a single reader we can send. If there is
a single reader and a single writer, then we cannot send, as that reader
will be paired with the existing writer. Therefore can_send is only true
if there are more readers than writers at the time of check.
NOTE: The original tests don't need to use wait-looping with thread.yield()
or heuristic sleep. Instead we can just use blocking channel operations
rather than non-blocking operations.
|
| | |\ \ |
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
`Unsupported_Flag` was used back when the iterator did not handle
`.Multiline`.
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This is always a pointer past the end of the buffer given to
`buddy_allocator_init`, which could be an invalid address. Printing may
result in a segmentation violation.
|
| | | | |
| | | |
| | | |
| | | | |
This takes into account eventual alignment.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This didn't take into account the size of the header plus the size of
the allocation itself by virtue of `align_forward_uint`; this could
result in no change if `size` was equal to `b.alignment` because the
number is aligned, and if `actual_size` and `size` ended up being equal,
no additional space would be requested.
This meant that a block would end up being allocated on top of its
buddy's head.
Fixes #3435
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
This was causing the procedure to find a block, then find one again,
or to not find a block and not try again.
|
| | | | | |
|
| | | |\ \
| | | | |
| | | | | |
Review `core/mem/allocators.odin`
|
| | | | | | |
|
| | | | |\ \ |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
It has been discovered that AddressSanitizer does not keep a 1:1 mapping
of which bytes are poisoned and which are not. This can cause issues for
allocations less than 8 bytes and where addresses straddle 8-byte
boundaries.
See the following link for more information:
https://github.com/google/sanitizers/wiki/AddressSanitizerAlgorithm#mapping
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
None of the other `*_alloc` procs are private, and this proc is even
referenced in public documentation comments.
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
There is no `dynamic_arena_free`; the mode is not implemented
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
The behavior is codified in the comment as returning `Invalid_Pointer`.
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
This is consistent with `Stack_Allocator`.
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Changed the check from `bytes` to `err` for safety's sake, too.
This will prevent the potential bug of allocating non-zero memory, then
doing a zeroed resize, which will result in having garbage data in the
initial half.
|
| | | | | | | |
|