thread
Brett 2024-06-05 12:46:23 -04:00
parent 13562d35ff
commit 2831e25ba5
3 changed files with 13 additions and 1 deletions

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.25)
project(blt-gp VERSION 0.0.9)
project(blt-gp VERSION 0.0.10)
option(ENABLE_ADDRSAN "Enable the address sanitizer" OFF)
option(ENABLE_UBSAN "Enable the ub sanitizer" OFF)

View File

@ -271,9 +271,20 @@ void test()
}
struct silly
{
long nyah;
int bruh;
};
int main()
{
test();
std::cout << alignof(silly) << " " << sizeof(silly) << std::endl;
blt::size_t remaining_bytes = 4096;
//auto* pointer = static_cast<void*>(head->metadata.offset);
//return std::align(alignment, bytes, pointer, remaining_bytes);
blt::gp::operation<float, float, int, bool> silly([](float f, int i, bool b) -> float {
return static_cast<float>(f);

View File

@ -88,6 +88,7 @@ namespace blt::gp
class stack_allocator
{
constexpr static blt::size_t PAGE_SIZE = 0x1000;
constexpr static blt::size_t MAX_ALIGNMENT = 8;
public:
/**
* Pushes an instance of an object on to the stack