Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Unity WebGL memory allocation suddenly jumps 600Mb

Discussion in 'Web' started by monark, Aug 28, 2020.

  1. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,598
    I've hit a weird memory situation in WebGL that I've not seen before.
    I'm using URP and not had this issue with the standard pipeline in the past.

    I run my game and I can see it using around 880Mb, then after a random amount of time and usage it will suddenly jump up 600Mb to 1,400Mb and then be stable there.
    Is this expected behaviour?

    I can see the memory move up a few meg as I interact with it, I can't find any memory leaks though.
    But then it just suddenly gives up and just sticks on 600Mb

    Is it expected that it hits some limit and that just triggers it to add a huge chunk of memory?

    I don't see anything similar happening in the editor, am I chasing my tail trying to find a memory leak?
    Should we expect memory to slightly drift up during normal operations and should it jump up in huge amounts if it so decides?
    Can we control the amount it jumps up by?