none
Do worker threads have limited amounts of memory? RRS feed

  • Question

  • Hi all;

    This is in relation to my question at Word Add-Ins.

    I am creating a worker thread and running code in it. That code needs to use about 2.5G of memory. However, at 1G of usage it throws an OutOfMemory error. My system still has tons of free memory according to the task manager.

    I was assuming that Office creates some limitation on the memory available to each AddIn. However, maybe it's the worker thread. Is there some setting for the worker thread that sets maximum memory?

    thanks - dave


    Who will win The International Collegiate Programming Championships?

    Wednesday, July 11, 2012 3:56 PM

Answers

  • Hi,

    if you are running in 32Bit, then you have a limitation of memory that can be used. A 32Bit .Net assembly can use about 1.4 GB of memory only (The limitation that comes from windows is 2 GB if I understood everything correctly.)

    So it is the memory usage of a .Net prozess in general and not specific to a worker thread.

    Solutions could be to use a 64Bit system only or to simply use less memory in your worker thread.

    With kind regards,

    Konrad

    • Marked as answer by DavidThi808 Wednesday, July 11, 2012 4:52 PM
    Wednesday, July 11, 2012 4:34 PM

All replies

  • Hi,

    if you are running in 32Bit, then you have a limitation of memory that can be used. A 32Bit .Net assembly can use about 1.4 GB of memory only (The limitation that comes from windows is 2 GB if I understood everything correctly.)

    So it is the memory usage of a .Net prozess in general and not specific to a worker thread.

    Solutions could be to use a 64Bit system only or to simply use less memory in your worker thread.

    With kind regards,

    Konrad

    • Marked as answer by DavidThi808 Wednesday, July 11, 2012 4:52 PM
    Wednesday, July 11, 2012 4:34 PM
  • Bingo! I didn't think of that but yes, an Office Add-In is a 32-bit app (no way around it).

    thanks - dave


    Who will win The International Collegiate Programming Championships?

    Wednesday, July 11, 2012 4:53 PM