linux_logo
linux_logo copied to clipboard
sysctl: Cannot allocate memory on FreeBSD 10
Output on FreeBSD 10:
- a "sysctl: Cannot allocate memory" error message
- the correct logo
- an information line with RAM information missing
FreeBSD Version 10.0-RELEASE, Compiled FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014
Zero Intel(R) Atom(TM) CPU C2750 @ 2.40GHz Processors, 0M RAM, -1.00 Bogomips Total
ysul.nasqueron.org
I've opened two PR's:
- Memory-handling improvements on #10
- Fix broken sysctl() calls on FreeBSD (64-bit) on #11
As you can see, both changes are merged to my own master branch.
@dereckson, can you try it out?
Ǹew output with your fixes works and shows RAM information correctly.
$ hub fetch vtorhonen
$ git checkout vtorhonen-freebsd-libsysinfo
$ git rebase vtorhonen-memory-handling
$ gmake clean all
$ ./linux_logo
, ,
/( )`
\ \___ / |
/- _ `-/ '
(/\/ \ \ /\
/ / | ` \
O O ) / |
`-^--'`< '
(_.) _ ) /
`.___/` /
`-----' /
<----. __ / __ \
<----|====O)))==) \) /====
<----' `--' `.__,' \
| |
\ / /\
______( (_ / \______/
,' ,-----' |
`--{__________)
FreeBSD Version 10.1-RELEASE-p26, Compiled FreeBSD 10.1-RELEASE-p26 #0: Wed Jan 13 20:59:29 UTC 2016 ro
Four Intel(R) Atom(TM) CPU C2750 @ 2.40GHz Processors, 3.6GB RAM, -1.00 Bogomips Total
ysul.nasqueron.org
Unfortunately, there is a problem with contact with @deater, @vtorhonen I will however include your patched in the Debian package.
Thanks @tdi.
I've a new one for FreeBSD, a segmentation fault for #R
memory information:
(lldb) thread list
Process 37158 stopped
* thread #1: tid = 101506, 0x00000008004107dd libc.so.7`memcpy + 205, name = 'linux_logo', stop reason = signal SIGSEGV: invalid address (fault address: 0x7ffefffff240)
(lldb) thread backtrace
* thread #1, name = 'linux_logo', stop reason = signal SIGSEGV: invalid address (fault address: 0x7ffefffff240)
* frame #0: 0x00000008004107dd libc.so.7`memcpy + 205
frame #1: 0x000000080040e5cd libc.so.7`___lldb_unnamed_symbol1635$$libc.so.7 + 397
frame #2: 0x00000008003a8a0c libc.so.7`___lldb_unnamed_symbol1024$$libc.so.7 + 14044
frame #3: 0x0000000800408005 libc.so.7`snprintf + 325
frame #4: 0x00000000002042c7 linux_logo`main [inlined] generate_sysinfo at linux_logo.c:396
frame #5: 0x00000000002041cf linux_logo`main [inlined] draw_logo at linux_logo.c:463