*scratch*

It is not a diary the most people have rather a *scratch* Emacs buffer. It keeps notes about everything related to Linux, Open Source, UNIX, MacOSX and software engineering.

Thursday, March 24, 2005

 

Plan9 2c tips: network, Unicode, keyboard, C compiling

Network settings, get IP, bring up DNS settings, set namespace:

bind -a '#I0' /net

ip/ipconfig # use DHCP server to get IP

ndb/cs #
ndb/dns -r # name resolution servers

cat /net/ndb # check network settings

Unicode in Plan9:

str() -> utf()

Rune is 16bit Unicode representation.

The equivalent of Ctrl-C is DEL.

Typing Cyrillic symbols may be via Alt combinaations:

Alt @ya --- я
Alt @a --- а
Alt @v --- в
...

Unicode translation table for Cyrillic is from 0400 to 0500:

0430 --- а 0410 --- А
044f --- я 042f --- я

unicode command may be used to translate symbols to codes and back:

unicode я # gives 044f
unicode 044f # gives я

Compiling on i386 (platform code 8):

8c -FNw a.c # produces a.8
8l -o a.out a.8 # link object file to a.out executable

Wednesday, March 23, 2005

 

AIX VA C/C++ heap debugger memdbg

Libraries to link with:

libhu.a
libhm.a

Compiler option to trigger compilation with memory debugging builtin:

-qheapdebug

Available functions under DBX:

_heap_check()
_dump_allocated()
_dump_allocated_delta()

Functions available from C/C++ to improve results of debugging with memdbg:

_uheap()
_uheapset()
_uheapwalk()

The fast way to change malloc behaviour is to introduce shell variable:

MALLOCTYPE=3.1

Means switch to legacy implementation of malloc, BSD style aka power of 2 boundaries allocations.

Archives

December 2004   January 2005   February 2005   March 2005   May 2005   July 2005   October 2005   January 2006   March 2006   May 2006   July 2006   December 2006   January 2007   February 2007   May 2007   July 2007   November 2007   January 2008   February 2008   July 2008   August 2008   September 2008   November 2008   April 2009  

This page is powered by Blogger. Isn't yours?