If a new slab is allocated, or an empty slab is reused, the list of empty slabs is now purged, if possible. Empty slabs which cannot be immediately purged "decay" and will be collected the next time a new slab is allocated or an empty slab is reused.
If a chunk is allocated and the slab which the chunk came from is fully utilized, the slab is moved to the end of its list. This should avoid searching this slab for free space before all other slabs of the same chunk size have been tested first. Slabs with free space are always placed closer to the head of the list.
A slab-allocator can now be used as the back-end for all memory allocations by setting __slab_max_size to a value > 0. This controls the slab size used for allocations and should be a power of 2, such as 2048 or 4096 bytes.
This change still needs testing.
Changes in the naming of certain dos.library functions in the
V53 header files are now accounted for. This also affects
unistd/stat/utime code which uses the same header file.
- Replaced ISO Latin 1 code #160 with a plain blank space (ASCII code #32) where necessary
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15305 87f5fb63-7c3d-0410-a384-fd976d0f7a62
- The fscanf() family failed to parse and convert %f parameters correctly
if the respective number did not begin with a digit, but a decimal
point. Hence ".7" would not be processed, but "0.7" would.
c.lib 1.206 (24.4.2015)
- Reworked the __putc() and putc() macros to reference the 'c' input
parameter only once, and to be free of side-effects when tinkering
with the buffer position.
- isatty() had the __fd_lock() call in the wrong place, which could have
led to cleanup problems later.
- The close action in the stdio, socket and termios hook code now
also zaps the fd pointer itself after cleaning up the file descriptor
table entry.
- Removed the remains of all the stack extension and stack overflow/underflow
checking code. It never actually worked. The bit that does work is the stack
usage measurement code, plus the bit that sets up the the custom stack
according to local setting or by calling a query function.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15215 87f5fb63-7c3d-0410-a384-fd976d0f7a62
checking code. It never actually worked. The bit that does work is the stack
usage measurement code, plus the bit that sets up the the custom stack
according to local setting or by calling a query function.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15212 87f5fb63-7c3d-0410-a384-fd976d0f7a62
parameter only once, and to be free of side-effects when tinkering
with the buffer position.
- isatty() had the __fd_lock() call in the wrong place, which could have
led to cleanup problems later.
- The close action in the stdio, socket and termios hook code now
also zaps the fd pointer itself after cleaning up the file descriptor
table entry.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15211 87f5fb63-7c3d-0410-a384-fd976d0f7a62
available only under OS4. There is a variant of dlopen() in libunix.a
which will perform a path name conversion. Note that these functions
will not work in the thread-safe variant of the library because it
would be unwise to tinker with the currently running program's binary.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15207 87f5fb63-7c3d-0410-a384-fd976d0f7a62
available only under OS4. There is a variant of dlopen() in libunix.a
which will perform a path name conversion.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15206 87f5fb63-7c3d-0410-a384-fd976d0f7a62
constructors are invoked, and after all local destructors have been
invoked.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15205 87f5fb63-7c3d-0410-a384-fd976d0f7a62
- Added support for ELF shared objects and libraries. This is implemented through
constructor/destructor functions, which means that you can use this
functionality even in Amiga Exec style shared libraries, with the proper
library initialization code to invoke the constructor/destructor functions
for you.
- Updated uname() to recognize AmigaOS 4.1.
- The translation from Unix to Amiga path names did not properly process
multiple occurences of "/./" in the path name. Thanks go to Steven Solie
for finding the issue.
- The detection of "/./" and "/../" patterns in Unix path names to be
translated into Amiga path names did not test if it was overrunning
the end of the string.
- If strcmp(), strncmp() and memcmp() detect a pair of different
characters, then the function result must be calculated as if the
characters were of type "unsigned char". This is a requirement
according to the ISO 'C' (1994) standard. Thanks go to Georg Steger
for finding the issue.
- The definitions for INT_MIN, INT_MAX and UINT_MAX in <limits.h> no
longer use long integer types, as prompted by Steven Solie.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15204 87f5fb63-7c3d-0410-a384-fd976d0f7a62
- Added a workaround for the baserel build flavour, which requires a specific
GCC version, e.g. 4.0.4 or earlier.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15202 87f5fb63-7c3d-0410-a384-fd976d0f7a62
under OS4 and beyond. The AmigaOS 2.x/3.x compatible code will still
use MEMF_ANY in the same situation, though. Other uses of MEMF_ANY have
been replaced as well where MEMF_PRIVATE would have made better sense.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15201 87f5fb63-7c3d-0410-a384-fd976d0f7a62
if the operating system can supply that detailed information.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15200 87f5fb63-7c3d-0410-a384-fd976d0f7a62
- Corrected the function prototype for wcspbrk().
- Added function prototypes for mbrtowc_l(), wcscoll_l(), wcscspn() and wcsrchr().
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15196 87f5fb63-7c3d-0410-a384-fd976d0f7a62
makefiles and the archive build script (that is: 'cp -a' becomes 'cp -p'
and 'cp -pR', depending upon the specific context).
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15195 87f5fb63-7c3d-0410-a384-fd976d0f7a62
works just about exactly like the amiga.lib RVI code used to do, which means
that there is no artificial length limit for the number of characters a string
retrieved may have, and the code is largely reentrant.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15191 87f5fb63-7c3d-0410-a384-fd976d0f7a62
dangerous and unnecessary.
- Plugged in 68k stubs for the OS4 build.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15190 87f5fb63-7c3d-0410-a384-fd976d0f7a62
function now substitutes a 10 microsecond timeout for a zero length timeout.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15189 87f5fb63-7c3d-0410-a384-fd976d0f7a62
it calls IsInteractive() on it.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15188 87f5fb63-7c3d-0410-a384-fd976d0f7a62
code as a reference. The 68k stubs currently only work for the 68k version of
the library, and a solution for the OS4 build still needs to be found. The code
is currently untested, but it should be complete.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15183 87f5fb63-7c3d-0410-a384-fd976d0f7a62
API functions, rather than omitting support for them in the 68k build.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15182 87f5fb63-7c3d-0410-a384-fd976d0f7a62
olaf in a different way so that libm.a never contains any hard float
opcodes and instead libm881 contains them. so the separate soft-float
directory are not required.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15181 87f5fb63-7c3d-0410-a384-fd976d0f7a62
and SetRexxVarFromMsg() will not be used and therefore not cause linkage errors
with our libamiga.a stubs anymore.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15180 87f5fb63-7c3d-0410-a384-fd976d0f7a62
resolve the issues with FPU code popping up in the mathieee#?.library
software floating point code.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15179 87f5fb63-7c3d-0410-a384-fd976d0f7a62