Re: Out of Memory Problem in VB 6.0 Application.



"Michael C" <nospam@xxxxxxxxxx> wrote in message news:O64mqrevFHA.612@xxxxxxxxxxxxxxxxxxxxxxx

> I just realised the dblRAValue arrays will be pointers so will
> not make part of the contiguous block of memory.

I don't think so, Michael. Try this:

Option Explicit
Private Type test
p1 As Long
p2 As Long
p3(1 To 500) As Double
End Type

Private Sub Command1_Click()
Dim myvar As test
Print Len(myvar), LenB(myvar)
End Sub

By the way, thanks for the info about VB arrays requiring a contiguous block of memory. I'm
still a little confused about it though, because on my system I can create a massive array that
requires much more real memory than I have on board and that can actually approach the total of
real memory and swap file (on disk) memory. So can I take it that Windows memory management is
able to treat a block of real RAM and a separate block of swap file (on disk) as one complete
contiguous block, and that the CopyMemory API would do so also? Just wondering.

Mike




.



Relevant Pages

  • Re: Out of Memory Problem in VB 6.0 Application.
    ... or smaller arrays. ... >>> not make part of the contiguous block of memory. ... >> real memory and swap file memory. ... > 'see', but limited control, in practice, over what is really going on. ...
    (microsoft.public.vb.general.discussion)
  • Re: Out of Memory Problem in VB 6.0 Application.
    ... Fixed arrays occupy the total of their size. ... >> not make part of the contiguous block of memory. ... > real memory and swap file memory. ... > contiguous block, and that the CopyMemory API would do so also? ...
    (microsoft.public.vb.general.discussion)
  • Re: HeapCreate and HeapAlloc confusion
    ... Why don't you just allocate a single contiguous block that is ... heap routines then you call HeapCreate and then HeapAlloc, ... But if HeapCreate reserved memory that was NOT contiguous (as the MSDN ... not allocate a contiguous block within that reserved by HeapCreate. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: On bit fields usage
    ... puts the header and payload in one contiguous block of memory because ... payload and i was wondering where i could have possibly gone wrong. ...
    (comp.lang.c)
  • Re: Out of Memory Problem in VB 6.0 Application.
    ... >> not make part of the contiguous block of memory. ... thanks for the info about VB arrays requiring a contiguous ... > contiguous block, and that the CopyMemory API would do so also? ... 'see', but limited control, in practice, over what is really going on. ...
    (microsoft.public.vb.general.discussion)