New Sub-Forum

In an effort to help make sure there are appropriate categories for topics of discussion that are happening, there is now a sub-forum for databases and database programming under Special Interest groups. Please direct questions, etc., about this topic to that sub-forum moving forward. Thank you.
See more
See less

More Memory for PB3.5

  • Filter
  • Time
  • Show
Clear All
new posts

  • More Memory for PB3.5

    Who wants More Memory ? Every one.
    It's easy. Just shift those stings from your code in to a file.
    At run time load them in to a virtual string array. Then when you want to
    CALL DS(23)

    In the sub DS(x as integer) you grab the string at loction 23
    depending on how you write your code this could do the LOCATE 12,5
    and print the string.
    You can write an application to search through your code, find suitable
    stings to squash, copy to the holding file, stick a ' infront of the code
    and add the required call DS() call.
    To find out how much memory you will save use something like XTGOLD to view
    you apps exe file. Towards the end of the exe you will find all the text stuff
    grouped together.
    I Have implemented the above and have halved this block of code.

  • #2
    This technique is also good for making your program handle different languages. On Linux, for example, there are libraries for doing this that let you create files of the messages in different languages, the file to use selected based on the current language. If you wrote an efficient caching routine, you could make this almost as fast as using internal, static strings.



    • #3
      How much memory does the EMM memory manager use ?

      Would it reduce the string space available to PB Dos ?



      • #4
        As far as I know extra stings will not use up any of your 640k.
        Each string will use will use the same amount of space as you will be
        using fixed length strings in the virtual string array. And as you are
        using QEMM memory manager you have 32M of ram for these strings
        I set my system up for 100 bite long strings so I can fit about
        300,000 strings ?

        Danny Blankenbyl