Vmaps - Python Arrays on mmap()

Version 1.1
Jan 22, 2002


Introduction


Support


License


Installing


Distribution


System Dependencies and Build Options


Other Compile Options

HEADALIGN

DFL_MM_PROT

DFL_MM_FLAGS

DFL_VM_FLAGS


Known Bugs


Changelog


Future Directions


Vmaps Module Reference

newmap ( fileno, size, [start, [mm_flags, [mm_prot, [vm_flags, [vm_type, [elsize]]]]]] )

PAGESIZE


mmap() Protection modes

PROT_READ

PROT_WRITE

PROT_EXEC


mmap() Flags

MAP_SHARED

MAP_PRIVATE

MAP_ANON

MAP_NORESERVE


msync() Flags

MS_SYNC

MS_ASYNC

MS_INVALIDATE


madvise() Flags

MADV_NORMAL

MADV_RANDOM

MADV_SEQUENTIAL

MADV_WILLNEED

MADV_DONTNEED

MADV_FREE


Vmap Access Types

Char

FixChar

FixLong

Int

Long

Float

Int2d

Long2d

Float2d


Vmap Flags

VM_AUTOPEN

VM_STAYOPEN

VM_ADVOPEN

VM_SYNCLOSE

VM_ASYNCLOSE

VM_KEEPTS

VM_DOFILL

VM_LLALE

VM_LLASG

VM_HEADER

VM_HDRLOCK

VM_HDRFAIL

VM_HDRTYPE

VM_HDRLEN


Vmap Object Reference


Attributes

isopen

vm_flags

vm_otype

len

databytes

headerbytes

overheadbytes

fileno

size start mm_prot mm_flags

mm_advflags

fillwith

hlckspins

hlckyield


Universal Methods

open ( [init, [bytes]] )

close ( )

astype ( [type, [size]] )

elsize ( )

elpage ( ndx )

getflag ( flag )

setflag ( flag )

clearflag ( flag )

times ( [reset] )

schyield ( )

find ( n, [lo, [hi]] )

sort ( [start, [count]] )

copyfrom ( source, [bytes, [istart, [sstart]]] )

raw_string ( [offset, [size]] )

raw_msync ( [flags, [offset, [size]]] )

raw_madvise ( [flags, [offset, [size]]] )

raw_mlock ( [offset, [size]] )

raw_munlock ( [offset, [size]] )

swapheader ( )

getheader ( )

setheader ( astring )

count_add ( toadd )

count_sub ( tosub )

count_get ( toadd )


Type Specific Methods

atswap ( el, new )

atswap ( el, col, new )

byteswap ( [start, [count]] )

resize ( size )

setrange ( v, [lo, [hi]] )

sumrange ( [lo, [hi]] )

cntbndrange ( [vlo, [vhi, [lo, [hi]]]] )

minmax ( [imin, [imax, [lo, [hi]]]] )

colxchg ( cola, colb, [lo, [hi]] )

colget ( el, col )


System Calls

mmap()

munmap()

msync()

madvise()

memmove()

sched_yield()

mlock()

munlock()


Vmap Headers

UDATA

TYPE


SIZE

COUNT


Shared memory and SMP


inctest.py (Piddly Purposeless Parallel Python)


Vmap Tutorial


Annoymous Mappings


Basic Access


FixChar Type


Numeric and 2D Access Types


FixLong Type and Unforgiving Acceptance


Stupid Bignum Tricks


Using Files


Other Features


Using Headers


Source code and documentation Copyright © 2002 by Mark Lamb
Linux (r) is a registered trademark of Linus Torvalds
Solaris (r) is a registered trademark of Sun Microsystems
Pentium and Pentium Pro (r) are trademarks of Intel
SPARC and SPARCcenter (r) are trademarks of SPARC International
... "of" is probably trademarked by someone; that and all the others are their owners'.