mirror of
https://github.com/wownero/RandomX.git
synced 2026-10-19 00:08:45 +02:00
Fix: hardcoded JIT code buffer size (#98)
* code buffer size is calculated based on RandomX parameters * added a maximum value constraint for program size and superscalar latency * reduced the x86 code size of memory instructions by 1 byte * disclaimer note in configuration documentation
This commit is contained in:
@@ -30,6 +30,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
constexpr std::size_t alignSize(std::size_t pos, std::size_t align) {
|
||||
return ((pos - 1) / align + 1) * align;
|
||||
}
|
||||
|
||||
void* allocExecutableMemory(std::size_t);
|
||||
void* allocLargePagesMemory(std::size_t);
|
||||
void freePagedMemory(void*, std::size_t);
|
||||
|
||||
Reference in New Issue
Block a user