Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug Vulkan does not report memory (correctly)

Discussion in 'Android' started by okluskyond, May 25, 2023.

  1. okluskyond

    okluskyond

    Joined:
    Dec 6, 2017
    Posts:
    34
    According to this tutorial I would expect that used memory would be reported with some precision or latency.

    https://learn.unity.com/tutorial/memory-management-in-unity#

    In my scenario I created 2GB of compute buffers without any reflection in any metrics in
    dumpsys meminfo
    or in Android studio profiler. Is this expected behavior? Is it only OpenGLES specific? How should I obtain Vulkan allocated memory?

    Code (CSharp):
    1.                    Pss  Private  Private  SwapPss      Rss     Heap     Heap     Heap
    2.                  Total    Dirty    Clean    Dirty    Total     Size    Alloc     Free
    3.                 ------   ------   ------   ------   ------   ------   ------   ------
    4.   Native Heap     5353     5316        4    12047     5496    22880    20307     2572
    5.   Dalvik Heap     1627     1520       44     1270     1956     8491     2347     6144
    6. Dalvik Other      202      172        0      827      236
    7.         Stack      656      656        0      468      664
    8.        Ashmem        6        0        0        0       12
    9.     Other dev     4807     4792        8        0     5072
    10.      .so mmap    10197      720     7728      542    20600
    11.     .jar mmap     2276        0     1224        0     5160
    12.     .dex mmap      114        0       32        4      248
    13.     .oat mmap      224        0       12        0     3848
    14.     .art mmap      714      236      212     1198     3732
    15.    Other mmap      193        8      168        1      376
    16.    EGL mtrack    41104    41104        0        0    41104
    17.     GL mtrack      192      192        0        0      192
    18.       Unknown     5373     5336       20    17721     5560
    19.         TOTAL   107116    60052     9452    34078    94256    31371    22654     8716
    20.  
    21. App Summary
    22.                        Pss(KB)                        Rss(KB)
    23.                         ------                         ------
    24.            Java Heap:     1968                           5688
    25.          Native Heap:     5316                           5496
    26.                 Code:     9716                          29916
    27.                Stack:      656                            664
    28.             Graphics:    41296                          41296
    29.        Private Other:    10552
    30.               System:    37612
    31.              Unknown:                                   11196
    32.  
    33.            TOTAL PSS:   107116            TOTAL RSS:    94256       TOTAL SWAP PSS:    34078
    34.  
    35. Objects
    36.                Views:        7         ViewRootImpl:        1
    37.          AppContexts:        5           Activities:        1
    38.               Assets:       26        AssetManagers:        0
    39.        Local Binders:       18        Proxy Binders:       48
    40.        Parcel memory:        9         Parcel count:       35
    41.     Death Recipients:        0      OpenSSL Sockets:        0
    42.             WebViews:        0
    43.  
    44. SQL
    45.          MEMORY_USED:        0
    46.   PAGECACHE_OVERFLOW:        0          MALLOC_SIZE:        0

    upload_2023-5-25_16-46-16.png
     
    Last edited: May 29, 2023