Skip to content

Commit 80d49ab

Browse files
authored
Fix profiler.c for OpenBSD (#2653)
Didn't compile on OpenBSD. Thanks to Oliver Krüger for raising this issue!
1 parent 741b017 commit 80d49ab

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

doc/source/history.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ FLINT version history
1010
FLINT 3.6.0 (in development)
1111
-------------------------------------------------------------------------------
1212

13+
Contributors
14+
15+
* Albin Ahlbäck (AA)
16+
* Edgar Costa (EC)
17+
* Fredrik Johansson (FJ)
18+
1319
Bug fixes
1420

1521
* Fix architecture-dependent test behaviour caused by undefined argument
@@ -30,6 +36,8 @@ Bug fixes
3036
The ``gr_stream_write`` family of functions have been marked
3137
``WARN_UNUSED_RESULT`` to catch similar bugs more easily.
3238
[FJ, `#2652 <https://github.com/flintlib/flint/pull/2652>`_].
39+
* Fix virtual memory usage fetchers for OpenBSD [AA reported by Oliver Krüger,
40+
`#2653 <https://github.com/flintlib/flint/pull/2653>`_].
3341

3442

3543
2026-04-24 -- FLINT 3.5.0

src/generic_files/profiler.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ void fprint_memory_usage(FILE * fs)
190190
virt = kp.p_vm_msize * getpagesize();
191191
rss = kp.p_vm_rssize * getpagesize();
192192
# elif defined(__OpenBSD__)
193-
virt = kp.p_vmspace.vm_map.size;
194-
rss = kp.p_vmspace.vm_rssize * getpagesize();
193+
virt = kp.p_vm_map_size;
194+
rss = kp.p_vm_rssize * getpagesize();
195195
# endif
196196
# endif /* non-Linux OS */
197197

0 commit comments

Comments
 (0)