On Wed, 19 Sep 2018 10:44:14 +0200, stecdose wrote:
> HOW does a 16bit truncate limit to 16384bytes?
>
> b1 b0 (byte 1, byte 0)
> b2 | | (byte 2)
> | | |
> decimal 81920 = hex 014000 decimal 65536 = hex size of size_t = 2
> b
I recently stumbled across this problem with Borland C (Affects all
borland 16bit C compilers, TC, BCPP).
The problem of a 2byte size_t
farcalloc was the solution to allocate a 256k buffer in my case.
But a part of your text gives me a question
On 07/29/2018 05:17 AM, TK Chia wrote:
A
Hi!
> while he didn't specify a warning level, WCL doesn't even warn with
> -W=9 :-< (watcom 1.9)
Wow...
>> In such case the halloc() & hfree() pair does seem to be the only way.
And those are deliberately kept separate from normal
memory allocation calls because of the bad access
performanc
sorry; code example below <>.
> On Sun, 29 Jul 2018 11:17:08 +0800, TK Chia wrote:
>> I double-checked the compiler output (using `wdis test.o') for the
>> malloc( ) call under the huge model, and found that it actually clips
>> the size to a `size_t', and `size_t' is a 16-bit integer type even f
> On Sun, 29 Jul 2018 11:17:08 +0800, TK Chia wrote:
>> I double-checked the compiler output (using `wdis test.o') for the
>> malloc( ) call under the huge model, and found that it actually clips
>> the size to a `size_t', and `size_t' is a 16-bit integer type even for
>> the huge model. I.e. ma
On Sun, 29 Jul 2018 11:17:08 +0800, TK Chia wrote:
> I double-checked the compiler output (using `wdis test.o') for the
> malloc( ) call under the huge model, and found that it actually clips
> the size to a `size_t', and `size_t' is a 16-bit integer type even for
> the huge model. I.e. malloc(819
Hello Mr. McMackins, hello Mr. Viste,
I found the bad code. While your example works, if I change it to use
calloc (which is what my code is using at the particular failure point),
then it fails. Looks like calloc is doing something funny.
Actually, I just found that both malloc( ) and calloc(
I found the bad code. While your example works, if I change it to use
calloc (which is what my code is using at the particular failure point),
then it fails. Looks like calloc is doing something funny.
Happy Hacking,
David E. McMackins II
Supporting Member, Electronic Frontier Foundation (#22969
On Sat, 28 Jul 2018 11:49:42 -0500, David McMackins wrote:
> Is there a way to allocate a buffer in OpenWatcom that is larger than
> 64k?
Sure. Either use XMS/EMS, or rely on the "huge model" kludge.
> I'm currently trying to stay within the compact memory model, but
> even if I compile for huge
Hello Mr. McMackins,
Is there a way to allocate a buffer in OpenWatcom that is larger than
64k? I'm currently trying to stay within the compact memory model, but
even if I compile for huge memory model, I'm getting an out of memory
error for trying to allocate about 80k for a buffer. My machine
Is there a way to allocate a buffer in OpenWatcom that is larger than
64k? I'm currently trying to stay within the compact memory model, but
even if I compile for huge memory model, I'm getting an out of memory
error for trying to allocate about 80k for a buffer. My machine has 128M
of memory, so I
11 matches
Mail list logo