| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
literal with sizeof(data)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
constexpr for uint[128, 192, 256]_t and its bswap(..)
basic_types: User refs > 32-bit values only
- Avoid mosre costly references size for small payload
Add uint[192, 256]_t
- New types uint192_t and uint256_t
Use constexpr for uint[128, 192, 256]_t and its bswap(..)
- constexpr ctor initializes storage with zero
- support further compiler optimizations
For all X_to_Y(T) conversions
- Use inline for 16-64 bit types
- Use value for all values <= 32 bits
- Use reference for all values > 32 bits
- Use constexpr for all own jau:uint[128,192,256]_t
For all put_uint*(..)
- Use value for all values <= 32 bits
- Use reference for all values > 32 bits
|
|
|
|
| |
function to be called at destruction of this instance
|
| |
|
| |
|
|
|
|
| |
Drop <T>
|
| |
|
|
|
|
|
| |
This revises commit 8e603953e960eb683c7fa00c9cf9fc39ab890c85
to use the smaller footprint nsize_t.
|
|
|
|
|
|
| |
element count and size semantics.
This refines commit 0814f8212ac1ec19fef79d8ed55a162d3d8583f3, supporting less invasize size types like nsize_t.
|
|
|
|
| |
nsize_t
|
|
|
|
|
|
|
|
|
| |
'ssize_t' alternatives using * int as its natural sized type
The leading 'n' stands for natural.
This is a compromise to indicate intend,
but to avoid handling a multiple sized 'size_t' footprint where not desired.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
avoid.
|
| |
|
| |
|
|
|
|
| |
semantics.
|
|
|
|
| |
relaxed_atomic_size_t
|
|
|
|
| |
settings for all, avoiding confusion.
|
| |
|
|
|
|
| |
adding frames w/o proc-name
|
|
|
|
| |
override; Also use shared_ptr<T>(T) ctor only once ;-)
|
|
|
|
| |
and hence limited use
|
|
|
|
| |
Value_type &&x), a thread safe method to replace Value_type
|
|
|
|
|
|
|
|
|
| |
Fix
- at(size_t): remove noexcept as bounds check throws exception
Add
- empty()
- move-assignment
|
| |
|
| |
|
|
|
|
|
|
| |
covering concurrent dtor (empty shared_ptr case)
JavaUplink also receives a dedicate setJavaObject() w/o arguments to reset the share_ptr, in an explicit manner.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
copy_store() and set_store(..)
Earlier we abused get_snapshot() for the custom write operation,
leading the read-operations using the same snapshot ending in a mutated vector -> BUG.
CoW write operations always need to operate on an actual copy of the vector,
like push_back() and then replace the store_ref at the end.
Hence added copy_store() to return a copy
and refined set_store(..) as a move operator requiring std::move(..)
to avoid a copy when replacing the store_ref.
|
|
|
|
| |
INSTRUMENTATION=ON (tag 0.2.0)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
using SC-DRF atomic synchronization.
See API doc for details.
First bring-up test w/ direct_bt using DEBUG leak and sanitizer successful.
Further testing ongoing, hence patched might followup - or not.
So far the goals has been reached:
- utilizing jau::sc_atomic_critical to synchronize with read operations
- utilizing a recursive write mutex to lock all write operations only
- underlying store is a shared_ptr<vector<T>>,
which gets replaced on write operations -> CoW
- same shared_ptr<vector<T>> can be used as snapshot (get_snapshot())
w/o additional costs, e.g for read operations or even write operations.
Since write mutex is exposed, using set_store(snapshot) allows
user to implement more complex mutations.
This is beingn used by direct_bt at one point.
- adding convenient push_back_unique(..) and erase_matching(..) methods,
as well as a for_each_cow(..) template to iterate over the snapshot
with consistently defined content.
|
|
|
|
| |
(SC) data race free (DRF) critical block
|
|
|
|
| |
sc_atomic_bool and relaxed_atomic_bool
|
| |
|
|
|
|
| |
-fsanitize-address-use-after-scope
|
|
|
|
|
|
|
|
|
|
|
|
| |
__attribute__((__packed__))' access - much cheaper!
Utilizing a no-cost template struct having the __packed__ attribute
utilizes the compiler to generate safe load and store operations.
This is validated via '-Wcast-align=strict', which verifies safe pointer cast for all platforms
on the current compilation host.
This also lead to fixing merge_uint128(*) unsafe cast + assignment.
|
|
|
|
|
|
|
|
|
|
| |
Add [get|put]_uint64(..) variants.
w/o handling misaligned address, we will have an undefined behavior.
"A pointer to an object or incomplete type may be converted to a pointer to a different object or incomplete type.
If the resulting pointer is not correctly aligned for the referenced type, the behavior is undefined."
The C Standard, ISO/IEC 9899:2011
|
|
|
|
|
|
|
| |
-Wall -Wextra -Wformat=2 -Wformat-overflow=2 -Wformat-nonliteral -Wformat-security
-Wformat-signedness -Wformat-y2k -Wnull-dereference -Winit-self -Werror
Tested with gcc 8 + 10 on 64bit and 32bit
|
|
|
|
|
|
| |
Full Warnings = Error:
-Wall -Wextra -Wformat=2 -Wformat-overflow=2 -Wformat-nonliteral -Wformat-security
-Wformat-signedness -Wformat-y2k -Wnull-dereference -Winit-self -Werror
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
and DEBUG
For GCC always enable all Warnings possible, supporting -Werror (Warning == Error).
in DEBUG mode enable '-fstack-protector-strong -fstack-check' and
all non-thread sanitizer: '-fsanitize=address -fsanitize=pointer-compare -fsanitize=pointer-subtract -fsanitize=undefined -fsanitize=leak'.
Notable: -fsanitize=thread TSAN's lacks ability to properly handle GCC's atomic macros (like helgrind etc), can't check SC-DRF!
|
| |
|
|
|
|
|
|
|
|
|
|
| |
for 'debug', 'debug_jni' and 'verbose' const fields.
Since environment is intended to be used for any project,
introduce 'root_prefix_domain' as set on the initial environment::get(..) call.
Use lower case 'debug' to avoid collision with DEBUG macro,
hence use all lower case const fields.
|
| |
|
| |
|