? VB3 Memory Model/Limitations -- looking for info 
Author Message
 ? VB3 Memory Model/Limitations -- looking for info

I am looking for articles on VB3 app's underlying memory model. I hear VB
programmers refering to the 64K limit, and there seem to be several
memory limits. The more technical the info the better, most of what I
have heard so far is rather vague.

Example questions I am looking to answer:
- what is the app's total available heap?
- what is the form/module heap and stack limits?
- how to 16-bit .DLL's fall into the memory usage picture?

I have a large app that is starting to exhibit the weirdness attributed
to the 64K limits, but based on NuMega Fail Safe output, neither my
Global Name Table or Global Symbol Table exceed 64K. Still the weird
GPF's occur -- for example doing a simple string concat... comment out
the line and the error goes away.

Any comments, suggestions, reading materials...

Also, if my memory serves VB5's manual still reference several 64K
limits. Does this mean that even by breaking an App up into ActiveX in-
process DLL's you could end up hitting the 64K wall -- in 32-bit land!!!

--
Read a good book and have a life... death to Spam!!!

Pursuant to US Code, Title 47, Chapter 5, Subchapter II, Sec. 227,
any and all nonsolicited commercial E-mail sent to this address is
subject to a download and archival fee in the amount of $500 US.
E-mailing denotes acceptance of these terms.



Mon, 10 Jan 2000 03:00:00 GMT  
 ? VB3 Memory Model/Limitations -- looking for info

This is a multi-part message in MIME format.

------=_NextPart_000_01BC98FB.C4A51E20
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

See VB3 Programmers Guide Appendix D: Specifications and Limitations.  If
you don't have it, check MSDN on microsoft.com.  This gives you a
reasonably good overview.  As a VB programmer you really don't know about
the heap or stack (managed by VB runtime).  The 64k limit is referring to
the segment size(s).  Each VB module or form has a (p-)code and a data
segment.  Also, they each have a symbol table that can be up to 64k.  If
you have a very large module, break it up into several smaller.  Exceeding
these limitations will typically give you an Out Of Memory.

String Length is limited to 32k (each string).

There are other limitations on general Windows resources that can come into
play.  Strange behavior can also be from API parameter passing problems
(passing an uninitialized (empty) strings for return info is a typical
example).  Also, VB3 has a problem when making an EXE after being in the VB
environment for a while.  It is strongly recommended to make your EXE in a
"fresh" copy of VB (exit and reenter).  I have also seen GPF's from DLL
version conflicts, as well as some conflicts between networking software
and certain VBX'es.

As for VB5, I wouldn't worry about it until I get there (or close, anyway).

HTH,
Tore.



Quote:
> I am looking for articles on VB3 app's underlying memory model. I hear VB
> programmers refering to the 64K limit, and there seem to be several
> memory limits. The more technical the info the better, most of what I
> have heard so far is rather vague.

> Example questions I am looking to answer:
> - what is the app's total available heap?
> - what is the form/module heap and stack limits?
> - how to 16-bit .DLL's fall into the memory usage picture?

> I have a large app that is starting to exhibit the weirdness attributed
> to the 64K limits, but based on NuMega Fail Safe output, neither my
> Global Name Table or Global Symbol Table exceed 64K. Still the weird
> GPF's occur -- for example doing a simple string concat... comment out
> the line and the error goes away.

------=_NextPart_000_01BC98FB.C4A51E20
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<html><head></head><BODY bgcolor=3D"#FFFFFF"><p><font size=3D2 =
color=3D"#000000" face=3D"Arial">See VB3 Programmers Guide Appendix D: =
Specifications and Limitations. &nbsp;If you don't have it, check MSDN =
on microsoft.com. &nbsp;This gives you a reasonably good overview. =
&nbsp;As a VB programmer you really don't know about the heap or stack =
(managed by VB runtime). &nbsp;The 64k limit is referring to the segment =
size(s). &nbsp;Each VB module or form has a (p-)code and a data segment. =
&nbsp;Also, they each have a symbol table that can be up to 64k. =
&nbsp;If you have a very large module, break it up into several smaller. =
&nbsp;Exceeding these limitations will typically give you an Out Of =
Memory.<br><br>String Length is limited to 32k (each =
string).<br><br>There are other limitations on general Windows resources =
that can come into play. &nbsp;Strange behavior can also be from API =
parameter passing problems (passing an uninitialized (empty) strings for =
return info is a typical example). &nbsp;Also, VB3 has a problem when =
making an EXE after being in the VB environment for a while. &nbsp;It is =
strongly recommended to make your EXE in a &quot;fresh&quot; copy of VB =
(exit and reenter). &nbsp;I have also seen GPF's from DLL version =
conflicts, as well as some conflicts between networking software and =
certain VBX'es.<br><br>As for VB5, I wouldn't worry about it until I get =
there (or close, anyway).<br><br>HTH,<br>Tore.<br><br><br>change =
&quot;doh&quot; to &quot;com&quot; to email me &lt;<font =

wrote in article &lt;<font =

color=3D"#000000">&gt;...<br>&gt; I am looking for articles on VB3 app's =
underlying memory model. I hear VB <br>&gt; programmers refering to the =
64K limit, and there seem to be several <br>&gt; memory limits. The more =
technical the info the better, most of what I <br>&gt; have heard so far =
is rather vague.<br>&gt; <br>&gt; Example questions I am looking to =
answer:<br>&gt; - what is the app's total available heap?<br>&gt; - what =
is the form/module heap and stack limits?<br>&gt; - how to 16-bit .DLL's =
fall into the memory usage picture?<br>&gt; <br>&gt; I have a large app =
that is starting to exhibit the weirdness attributed <br>&gt; to the 64K =
limits, but based on NuMega Fail Safe output, neither my <br>&gt; Global =
Name Table or Global Symbol Table exceed 64K. Still the weird <br>&gt; =
GPF's occur -- for example doing a simple string concat... comment out =
<br>&gt; the line and the error goes away.<br>&gt; <br><br></p>
</font></font></font></font></font></body></html>
------=_NextPart_000_01BC98FB.C4A51E20--



Tue, 11 Jan 2000 03:00:00 GMT  
 ? VB3 Memory Model/Limitations -- looking for info

Quote:

> I have a large app that is starting to exhibit the weirdness attributed
> to the 64K limits, but based on NuMega Fail Safe output, neither my
> Global Name Table or Global Symbol Table exceed 64K. Still the weird
> GPF's occur -- for example doing a simple string concat... comment out
> the line and the error goes away.

I have seen the same problem - doing a Trim$() on a string of only 4K or so
when memory is low is enough to get a "Out of String Space" error. No
solution for it that we could find without t{*filter*} down the app. (Not a
solution here).
My interpretation is that the 64K limit is more of a best-case scenario;
rarely met in reality. Large apps reduce this space to almost nothing
pretty quickly.
Sorry I couldn't help.


Sun, 16 Jan 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. ? VB3 Memory Model/Limitations -- looking for info

2. ? VB3 Memory Model/Limitations -- looking for info

3. Please help again: VB3 and Memory Limitations

4. Memory? VB5.0 memory limitations

5. Memory? VB5.0 memory limitations

6. Memory? VB5.0 memory limitations

7. Memory? VB5.0 memory limitations

8. Version info Office Object models

9. Memory limitations

10. VB3.0 Control Limitations

11. Bug/limitation with VB3.0 / Access 2.0 compatability layer

12. Outline memory limitation

 

 
Powered by phpBB® Forum Software