Niakwa, Inc.



What's News
NPL Products
NPL Support
NPL Downloads
System Integration
swiggle_small.gif (991 bytes)

swiggle_small.gif (991 bytes)

April 15, 1996 No. 83

Known NDM/Btrieve Problems

Over the last several months Niakwa has confirmed two problems reported by vendors relating to the operation of the Niakwa Data Manager (NDM) and Btrieve. The following is a description of both problems, the first of which is a problem in Niakwa’s NDM API and the second being a problem in Btrieve revision 6.15.

1. Memory Allocation Problem on 16-bit versions (MS-DOS/MS-Windows)

Under certain circumstances, NDM Revision 1.20.xx incorrectly ignores an internal limitation of the MS-DOS and MS-Windows versions of NDM (16-bit versions). In this case, NDM cannot allocate a block of memory greater than 64K. The problem is that NDM does not detect this and ends up allocating a smaller block of memory than requested. NDM then allows the program to access memory beyond the actually allocated block which produces unpredictable results. Specifically, the problem occurs when a program requests NDM to allocate more file handles (when executing a call to ‘31320 - NDM_INITIALIZE) than will fit in a 64K block of memory.

For example, assume a call to NDM_INITIALIZE requests space to be allocated for 200 file handles. Each file handle normally requires 895 bytes, so this call requests NDM to allocate a block of memory 179,000 bytes long, thus violating the 64K limitation. The problem is that NDM does not detect this.

The problem can be avoided by:

1. Do not allocate excessive file handles.

2. Reduce the default size of the file handle by calling ‘31045 (NDM_SET_MAX_KEY_SEGS) before the call to NDM_INITIALIZE.

3. Use the 32-bit version of NDM.

Under normal conditions (no call performed to NDM_SET_MAX_KEY_SEGS) the maximum number of file handles NDM can allocate is 73. This problem has been corrected in Revision 1.20.10 of the NDM API and is available upon request from Niakwa Technical Support.

2. Btrieve 6.15 Bug

The Btrieve TSR (version 6.15) for local DOS access (not Novell) contains a problem in the timer interrupt. The Btrieve program (or more likely the DOS extender it uses) does not preserve all registers correctly and ultimately causes problems in other 32-bit programs calling into this TSR (like RTINDM and RTPNDM).

Niakwa is currently working with Btrieve Technologies to resolve this problem. Addtional information on this problem will posted on the Niakwa BBS and WWW site as it becomes available.

blank.gif (841 bytes)

Niakwa, Basic-2C and NPL are trademarks of Niakwa, Inc. All other products mentioned are registered trademarks or trademarks of their respective companies.

Questions or problems regarding this web site should be directed to
Copyright 1996-2010 Niakwa, Inc. All rights reserved.
Last updated: Thursday January 07, 2010.