• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. makeTable memory usage

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 143
  • Views 14481
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

makeTable memory usage

ahamlett
ahamlett over 16 years ago

Is there a way to release the memory used by the makeTable() function? If you assign nil to the variable holding the table object, will the table be deleted and the memory freed?

I would like to use makeTable in a pcell, however I'm worried about using too much memory if the table data is always around and duplicated wherever the pcell is used.

I could use remove(g_key o_table) on every element.

  • Cancel
  • skillUser
    skillUser over 16 years ago

    Hi there,

    You may be aware that garbage collection is the process by which unused memory is reclaimed.  There are various ways that memory can become unused, for example, it was allocated in a let statement and this block of code has been executed and exited, or as you state, by effectively removing references to the memory.  Once all references to a chunk of memory have been removed, it is liable for garbage collection.  This process occurs every so often, but can be initiated by the user also, using the gc() function. See the following section in the SKILL Language User Guide in SourceLink:  "Memory Management (Garbage Collection)"

    I would recommend using an encapsulation technique when writing your PCell code, so that the code that does all of the work is encapsulated in a procedure which can be debugged outside of the PCell development, and also potentially re-used by other PCells. Something like the following:

      pcDefinePCell(
       list( ddGetObj("libName") "cellName" "layout")
       (
        ( paramA 1.0 )
        ( paramB 2.0 )
       )
       myPCellTopFunction( pcCellView paramA paramB )
      )
    

     Hopefully the above information and pointers will help you.

    Best regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Austin CAD Guy
    Austin CAD Guy over 16 years ago

     Also be aware that when you pass a table as an argument, you are passing a pointer to the table and not the values in it. So if you change a value in the table inside a program where it came in as an argument, you change the table itself.

    HOWEVER- It is much faster and takes less memory to pass the table as an argument than to pass the very large list of individual arguments. If your table variable is defined in a let statement, it will be garbage collected when it finally goes out of scope.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information