Merge pull request #3201 from botter-nidnul/aarch64_mapsize_fix

vere: change lmdb mapsize for aarch64
This commit is contained in:
Joe Bryan 2020-07-28 11:41:15 -07:00 committed by GitHub
commit ee2aa2aab9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

6
pkg/urbit/configure vendored
View File

@ -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

View File

@ -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");