dtoc man page on NetBSD

Man page or keyword search:  
man Server   9087 pages
apropos Keyword Search (all sections)
Output format
NetBSD logo
[printable version]

CTOD(9)			 BSD Kernel Developer's Manual		       CTOD(9)

NAME
     ctod — macros related to bytes, pages, and disk blocks

SYNOPSIS
     #include <sys/param.h>

     size
     ctod(size x);

     size
     dtoc(size x);

     size
     ctob(size x);

     size
     btoc(size x);

     size
     dbtob(size x);

     size
     btodb(size x);

DESCRIPTION
     The ctod family of macros can be used to convert between bytes, pages
     (“clicks”), and disk blocks.

     The following table lists the possible conversions:

	   Macro	   From		   To
	   ctod()	   pages	   disk blocks
	   dtoc()	   disk blocks	   pages
	   ctob()	   pages	   bytes
	   btoc()	   bytes	   pages
	   dbtob()	   disk blocks	   bytes
	   btodb()	   bytes	   disk blocks

     These are typical macros that may appear with different names in other
     operating systems.	 Examples include btop() and btopr() in Solaris.

SEE ALSO
     param(3)

HISTORY
     Some of these macros appeared in Version 7 AT&T UNIX.

CAVEATS
     The described macros make no assumptions about the type of the input
     parameter.	 A caller should ensure that neither integer overflow nor
     integer underflow are possible.

BSD				 April 8, 2011				   BSD
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server NetBSD

List of man pages available for NetBSD

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net