mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 10:03:03 +01:00
removed 16-bit support, breaking big-blocks allocation
This commit is contained in:
parent
8965aea8bf
commit
fa563c9b0d
@ -153,23 +153,18 @@ BLK ALLR_block(UCHAR type, ULONG count)
|
|||||||
throw std::bad_alloc();
|
throw std::bad_alloc();
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma FB_COMPILER_MESSAGE("Warning: outdated assumption for 16-bit platforms")
|
ULONG size = REM_block_sizes[type].typ_root_length;
|
||||||
// Compute block length, recasting count to make sure the calculation
|
ULONG tail = REM_block_sizes[type].typ_tail_length;
|
||||||
// comes out right on 16-bit platforms (like MS-DOS or Win16).
|
|
||||||
|
|
||||||
const USHORT ucount = (USHORT)count;
|
if (tail && count >= 1) {
|
||||||
USHORT size = REM_block_sizes[type].typ_root_length;
|
size += (count - 1) * tail;
|
||||||
USHORT tail = REM_block_sizes[type].typ_tail_length;
|
|
||||||
|
|
||||||
if (tail && ucount >= 1) {
|
|
||||||
size += (ucount - 1) * tail;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BLK block = (BLK)
|
BLK block = (BLK)
|
||||||
#ifdef DEBUG_GDS_ALLOC
|
#ifdef DEBUG_GDS_ALLOC
|
||||||
ALLR_alloc_debug((ULONG) size, FileName, LineNumber);
|
ALLR_alloc_debug(size, FileName, LineNumber);
|
||||||
#else
|
#else
|
||||||
ALLR_alloc((ULONG) size);
|
ALLR_alloc(size);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// NOMEM: callee handled
|
// NOMEM: callee handled
|
||||||
|
Loading…
Reference in New Issue
Block a user