See the top rated post in this thread. Click here

Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Running out of memory for lisp routines

  1. #1
    Member
    Join Date
    2015-01
    Posts
    43
    Login to Give a bone
    0

    Default Running out of memory for lisp routines

    As I have been adding more and more lisp routines to my company's set up, I'm reaching the point where the LISP routines stop working. No bugs, all we have to do is restart AutoCAD and everything works again until we've been in a session too long. I'm pretty sure we are blowing out the memory (32G on Window 10 machines)

    I have read that modifying the memory allocations for LISP is not recommended as it affects the string space. If we increase our RAM to 64G will that increase the amount of memory AutoCAD allocates to LISP?

    Also, if I re-wrote some routines in VBA (don't have my .NET chops down yet) is that loaded into a separate memory space?

    Any help is greatly appreciated

  2. #2
    All AUGI, all the time
    Join Date
    2003-07
    Posts
    559
    Login to Give a bone
    1

    Default Re: Running out of memory for lisp routines

    Rather than load them all have you looked at Autoload or as I do in my menu's load on demand.

  3. #3
    I could stop if I wanted to
    Join Date
    2006-04
    Posts
    466
    Login to Give a bone
    0

    Default Re: Running out of memory for lisp routines

    (DEFUN C:READD()
    (LOAD "Readd.lsp")
    (C:READD)
    );END READD

  4. #4
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,665
    Login to Give a bone
    0

    Default Re: Running out of memory for lisp routines

    Like BIG-AL almost all of the lisp I use is loaded on demand from the CUI or set up to autoload. The fact that you are having problems after using a few of them is probably a coding issue. Avoid using global variables at all if possible. Saving large selection sets use up a lot of memory so if you use something like
    Code:
    (setq SS (ssget))
    in your code adding
    Code:
    (setq SS nil)
    at the end clears it from memory.

  5. #5
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,804
    Login to Give a bone
    2

    Default Re: Running out of memory for lisp routines

    Quote Originally Posted by deheylen690271 View Post
    As I have been adding more and more lisp routines to my company's set up, I'm reaching the point where the LISP routines stop working. No bugs, all we have to do is restart AutoCAD and everything works again until we've been in a session too long. I'm pretty sure we are blowing out the memory (32G on Window 10 machines)

    I have read that modifying the memory allocations for LISP is not recommended as it affects the string space. If we increase our RAM to 64G will that increase the amount of memory AutoCAD allocates to LISP?

    Also, if I re-wrote some routines in VBA (don't have my .NET chops down yet) is that loaded into a separate memory space?

    Any help is greatly appreciated
    Are you sure you don't just have global variables that are stomping on each other? I can't see how even thousands of ASCII lisp files would "blow out the memory" on a modern PC.
    R.K. McSwain | CAD Panacea |

  6. #6
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    2

    Default Re: Running out of memory for lisp routines

    Quote Originally Posted by deheylen690271 View Post
    As I have been adding more and more lisp routines to my company's set up, I'm reaching the point where the LISP routines stop working. No bugs, all we have to do is restart AutoCAD and everything works again until we've been in a session too long. I'm pretty sure we are blowing out the memory (32G on Window 10 machines)
    This and that are mutually exclusive.

    I've been running 32 GB RAM in Win10x64 Enterprise for 2-3 years now (only recently upgraded to 64 GB) without having experienced a single instance of 'LISP blowing out the memory'... If LISP is your culprit, then you've got one or more LISP routines with global variables that need to be localized, IMHO.

    Cheers


    [Edit] - RK beat me.
    Last edited by BlackBox; 2019-06-25 at 12:30 PM.
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  7. #7
    I could stop if I wanted to
    Join Date
    2006-04
    Posts
    466
    Login to Give a bone
    0

    Default Re: Running out of memory for lisp routines

    how big could an autolisp program be?

  8. #8
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,804
    Login to Give a bone
    0

    Default Re: Running out of memory for lisp routines

    Quote Originally Posted by aaronic_abacus View Post
    how big could an autolisp program be?
    No real limit, other than hardware.

    You might be familiar with this thread on the topic.
    R.K. McSwain | CAD Panacea |

  9. #9
    I could stop if I wanted to hugh.69031's Avatar
    Join Date
    2016-01
    Location
    Melbourne, Australia
    Posts
    360
    Login to Give a bone
    0

    Default Re: Running out of memory for lisp routines

    Quote Originally Posted by deheylen690271 View Post
    As I have been adding more and more lisp routines to my company's set up, I'm reaching the point where the LISP routines stop working. ...
    Could be runaway recursion in a recently added routine. What changed? Have you tried backtracking to a point where loaded routines do not misbehave and then add routines one by one until trouble reappears?

    Good luck.
    Last edited by hugh.69031; 2019-06-26 at 03:13 AM.

  10. #10
    Member
    Join Date
    2015-01
    Posts
    43
    Login to Give a bone
    0

    Default Re: Running out of memory for lisp routines

    Thanks for the help BlackBox. I do use some globalized variables but only when it's necessary and most routines are auto-loaded. The problem had gotten so bad that I couldn't even make it through acaddoc without routines not getting loaded. I think the problem may have been that I set the Acad, Documents, ActiveDocument, SelectionSets, Blocks, ModelSpace, PaperSpace, Utility, Database, Preferences & Display objects as global variables in acaddoc because I make extensive use of them in other routines. If this was the problem, I don't know why everything worked until a month ago. I (painfully) rewrote all my code to localize these objects and it seems to have improved the situation. At this point, this is going to have be good enough.

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 5
    Last Post: 2015-10-19, 07:59 AM
  2. 2011: Memory Crash (running out of memory)
    By gfreddog in forum AutoCAD General
    Replies: 9
    Last Post: 2012-04-19, 08:16 PM
  3. Replies: 2
    Last Post: 2011-06-28, 09:49 PM
  4. Autocad 09 Running out of memory
    By rlh in forum AutoCAD General
    Replies: 4
    Last Post: 2009-09-23, 02:00 PM
  5. Running out of memory!
    By chodosh in forum Revit - Hardware & Operating Systems
    Replies: 20
    Last Post: 2007-10-13, 03:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •