Stack.C Icon

Stack.C

Stack.C - Stack management functions

Stack.COverview

Many times I wanted to have one or more stacks for the program I was working on. Sometimes I did without -- especially on Quick and Dirty utilities. At other times I cobbled up something that more or less seemed to work. Crashes were common ... So I decided to take the time to do something about it.This is the result. - The Stack system is based on dynamic arrays: automatically growing the stacks when needed. The growing is done in Steps of 16 items. This reduces the number of required memory reallocations (and therefore the number of allocation failures). - Stack shrinking is intentionally not implemented. - ItemSizes larger than 2kB are not supported: the minimum of initial StackItems per stack is currently 32. An assert (debug version) limits ItemSizes: = 2 Bytes. For large data items a separate 'user' module is probably sensible. StackUnpop is added to take a look at info, especially size info so an appropriate amount of memory can be allocated by the user. - A certain amount of redundancy is provided to enable integrity checks for use in programs with 'wild pointer' problems. - Compile with NDEBUG defined for a 'production' version. Compile with NDEBUG _not_ defined for a debug version. - Some functions benefit by using the compilers optimizer. Especially 'Common Sub-expression Optimizations'. - Some items should be unsigned in stead of int. Not a real problem. Detected by checking the appropriateness and ranges of types. - In some places an int is cast to unsigned, then tested for a 'large' value including 'Negative' values. This may be non-portable.

NEW

Fixed some bugs.

Stack.CInformation

Version
N/A
Date
05.05.10
License
Free
Language
English
File Size
12KB
Developer
Category
SubCategory
Operating Systems
Windows ,Linux,BSD,Solaris
System Requirements
No additional system requirements.
Round.H Icon
This is a script for ruby.
Free
Approx.C Icon
This is a script for C/C++.
Free
Notrail.C Icon
This is a script for C/C++.
Free
Strucfil.C Icon
This is a script for C/C++.
Free
Btree.Mak Icon
This is a script for C/C++.
Free
Eng.C Icon
This is a script for C/C++.
Free
Soundex.C Icon
This is a script for C/C++.
Free
Isqrt.C Icon
This is a script for C/C++.
Free
More
hping Icon
hping is a command-line oriented TCP/IP packet assembler/analyzer
Free
KWrite Icon
KWrite is a text editor by KDE, based on the Kate's editor component.
Free
SQLite Icon
SQLite is a in-process library that implements a self-contained
Tiny C Compiler Icon
Tiny C Compiler compiler helps to compile and execute C code
Free
XSane Icon
XSane is a graphical scanning frontend. It uses the SANE-library to talk to scan
Free
BIOS Simulator Icon
The code is just the simulation of the BIOS setup environment
Free
g3data Icon
g3data is a tool for extracting data from scanned graphs.
Free
KmPlot Icon
KmPlot is a mathematical function plotter for the KDE-Desktop.
Free
More