mirror of
https://github.com/urbit/shrub.git
synced 2024-12-24 03:14:30 +03:00
vere: change lmdb mapsize for aarch64
Adds aarch64 lines to pkg/urbit/configure and defines a new macro, U3_CPU_aarch64. That macro is used in pkg/urbit/vere/disk.c to change the lmdb mapsize from 1TB to 60GB for aarch64 on linux. Uses #if defined instead of #ifdef in anticipation of aarch64 on macos being a thing before the end of the year.
This commit is contained in:
parent
c96705e755
commit
58f8fe04ec
4
pkg/urbit/configure
vendored
4
pkg/urbit/configure
vendored
@ -46,6 +46,10 @@ case $(tr A-Z a-z <<< $cpu) in
|
||||
x86_64)
|
||||
defmacro U3_OS_ENDIAN_little 1
|
||||
;;
|
||||
aarch64)
|
||||
defmacro U3_OS_ENDIAN_little 1
|
||||
defmacro U3_CPU_aarch64 1
|
||||
;;
|
||||
*)
|
||||
echo "Unknown or unsupported CPU: '$cpu'" >&2
|
||||
exit 1
|
||||
|
@ -752,7 +752,11 @@ u3_disk_init(c3_c* pax_c, u3_disk_cb cb_u)
|
||||
// "[..] on 64-bit there is no penalty for making this huge (say 1TB)."
|
||||
//
|
||||
{
|
||||
const size_t siz_i = 1099511627776;
|
||||
#if defined(U3_CPU_aarch64) && defined(U3_OS_linux)
|
||||
const size_t siz_i = 64424509440;
|
||||
#else
|
||||
const size_t siz_i = 1099511627776;
|
||||
#endif
|
||||
|
||||
if ( 0 == (log_u->mdb_u = u3_lmdb_init(log_c, siz_i)) ) {
|
||||
fprintf(stderr, "disk: failed to initialize database");
|
||||
|
Loading…
Reference in New Issue
Block a user