[DiscordArchive] <@200677690838220800> Do you know the proper struct name of DynamicUF in client?
[DiscordArchive] <@200677690838220800> Do you know the proper struct name of DynamicUF in client?
Archived author: Tea • Posted: 2025-01-03T10:56:56.234000+00:00
Original source
yes, if size > 1 its exactly the same as blz::vector
Archived author: MaxtorCoder • Posted: 2025-01-03T10:57:02.540000+00:00
Original source
Ah
Archived author: Tea • Posted: 2025-01-03T10:57:03.342000+00:00
Original source
in fact its implemented with blz::vector
Archived author: MaxtorCoder • Posted: 2025-01-03T10:58:04.863000+00:00
Original source
Isn't it just like a blz::fixed_vector then? Or whatever the name of the struct is when `m_capacity_is_embedded` is set in blz::vector
tatic_vector (same page) where it never heap allocates and can never exceed that fixed capacity
Archived author: Tea • Posted: 2025-01-03T10:59:33.989000+00:00
Original source
if they have a fixed_vector (i dont see it in debug client), it would be like boost:
tatic_vector (same page) where it never heap allocates and can never exceed that fixed capacity
Archived author: MaxtorCoder • Posted: 2025-01-03T11:12:10.447000+00:00
Original source
Okay makes sense
tring uses something like that
Archived author: MaxtorCoder • Posted: 2025-01-03T11:12:18.225000+00:00
Original source
I do know blz:
tring uses something like that
Archived author: Tea • Posted: 2025-01-03T11:18:27.170000+00:00
Original source
yes and in both cases `bool capacity_is_embedded () const { return m_capacity & 0x8000000000000000; }`
Archived author: MaxtorCoder • Posted: 2025-01-03T11:24:48.866000+00:00
Original source
Yes
Archived author: MaxtorCoder • Posted: 2025-01-03T11:26:11.818000+00:00
Original source
But in "IDA" struct it would be kinda like this I guess
```c
template <typename T, typename N = 0>
struct blz::vector
{
T* m_elements;
uint64_t m_size;
uint64_t m_capacity : 63;
uint64_t m_capacity_is_embedded : 1;
T m_storage[N]; //< Only set when m_capacity_is_embedded is set
};
```