#include "pls/internal/data_structures/aligned_stack.h"
#include "pls/internal/base/system_details.h"

namespace pls {
namespace internal {
namespace data_structures {

aligned_stack::aligned_stack(pointer_t memory_region, const std::size_t size) :
    memory_start_{memory_region},
    memory_end_{memory_region + size},
    head_{base::alignment::next_alignment(memory_start_)} {}

aligned_stack::aligned_stack(char *memory_region, const std::size_t size) :
    memory_start_{(pointer_t) memory_region},
    memory_end_{(pointer_t) memory_region + size},
    head_{base::alignment::next_alignment(memory_start_)} {}

}
}
}
