mirror of
https://github.com/urbit/shrub.git
synced 2024-12-19 16:51:42 +03:00
Merge pull request #3201 from botter-nidnul/aarch64_mapsize_fix
vere: change lmdb mapsize for aarch64
This commit is contained in:
commit
ee2aa2aab9
6
pkg/urbit/configure
vendored
6
pkg/urbit/configure
vendored
@ -30,7 +30,7 @@ if [ -n "${HOST-}" ]
|
||||
then os=$(sed 's$^[^-]*-\([^-]*\)-.*$\1$' <<< "$HOST")
|
||||
cpu=$(sed 's$-.*$$' <<< ${HOST})
|
||||
else os=$(uname -s)
|
||||
cpu=$(uname -p)
|
||||
cpu=$(uname -m)
|
||||
fi
|
||||
|
||||
case $(tr A-Z a-z <<< $cpu) in
|
||||
@ -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