Each object file in a static archive file (.a) is loaded into its own mmap()ed page
GHC API 7.8.x uses much more memory than GHC API 7.6.x. Attached two files demonstrate this:
- A.hs -- Simple program using GHC API (copied from Wiki)
- B.hs -- A target file, just hello world
You can compile A.hs as follows:
% ghc A.hs -package ghc -package ghc-paths
A.hs stays in 10 seconds. So, we can investigate its memory usage with the "top" command.The following is the result:
Mac (64bit) Linux (64bit)
GHC 7.6.3: 20MB 4MB
GHC 7.8.3: 106MB 13MB
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.8.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | GHC API |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |
Edited by Thomas Miedema