-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
good first issueIndicates a good issue for first-time contributors to JuliaIndicates a good issue for first-time contributors to Julia
Description
julia> versioninfo()
Julia Version 1.7.2
Commit bf53498635 (2022-02-06 15:21 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i7-10875H CPU @ 2.30GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, skylake)
julia> b=big(17)^300;
julia> Base.summarysize(b)
16
According to the discussion https://discourse.julialang.org/t/how-do-i-get-the-memory-size-of-a-bigint/ ,
the b.alloc field contains the number of limbs allocated by GMP.
Base.summarysize(b) should return this:
julia> div(b.alloc * Base.GMP.BITS_PER_LIMB, 8)
184
StefanKarpinski and JeffBezanson
Metadata
Metadata
Assignees
Labels
good first issueIndicates a good issue for first-time contributors to JuliaIndicates a good issue for first-time contributors to Julia