0

我用 Unity3d 在 webplayer 上制作应用程序并在 webbrowser 中运行它。我的应用程序在场景中加载了大量带有网格的游戏对象(带有资产包)。并且在某些时候它会以错误退出。部分日志:

 DynamicHeapAllocator allocation probe 1 failed - Could not get memory for     large allocation 2273563.
 DynamicHeapAllocator allocation probe 2 failed - Could not get memory for large  allocation 2273563.
 DynamicHeapAllocator allocation probe 1 failed - Could not get memory for large allocation 2273563.
DynamicHeapAllocator allocation probe 1 failed - Could not get memory for large allocation 2273563.
DynamicHeapAllocator allocation probe 2 failed - Could not get memory for large allocation 2273563.
DynamicHeapAllocator allocation probe 3 failed - Could not get memory for large allocation 2273563.
DynamicHeapAllocator allocation probe 4 failed - Could not get memory for large allocation 2273563.
DynamicHeapAllocator out of memory - Could not get memory for large allocation 2273563!
Could not allocate memory: System out of memory!
Trying to allocate: 2273563B with 16 alignment. MemoryLabel: TempOverflow
Allocation happend at: Line:133 in    C:/buildslave/unity/build/Runtime/Allocator/ThreadsafeLinearAllocator.cpp
Memory overview

[ ALLOC_DEFAULT ] used: 442692589B | peak: 0B | reserved: 487509325B 
[ ALLOC_TEMP_JOB ] used: 0B | peak: 0B | reserved: 4194304B 
[ ALLOC_GFX ] used: 170789102B | peak: 0B | reserved: 210481854B 
[ ALLOC_CACHEOBJECTS ] used: 340080196B | peak: 0B | reserved: 352321536B 
[ ALLOC_TYPETREE ] used: 731568B | peak: 0B | reserved: 5242880B 
[ ALLOC_PROFILER ] used: 2986680B | peak: 0B | reserved: 12582912B 
Could not allocate memory: System out of memory!
Trying to allocate: 2273563B with 16 alignment. MemoryLabel: TempOverflow
Allocation happend at: Line:133 in       C:/buildslave/unity/build/Runtime/Allocator/ThreadsafeLinearAllocator.cpp
Memory overview

[ ALLOC_DEFAULT ] used: 442692589B | peak: 0B | reserved: 487509325B 
[ ALLOC_TEMP_JOB ] used: 0B | peak: 0B | reserved: 4194304B 
[ ALLOC_GFX ] used: 170789102B | peak: 0B | reserved: 210481854B 
[ ALLOC_CACHEOBJECTS ] used: 340080196B | peak: 0B | reserved: 352321536B 
[ ALLOC_TYPETREE ] used: 731568B | peak: 0B | reserved: 5242880B 
[ ALLOC_PROFILER ] used: 2986680B | peak: 0B | reserved: 12582912B 


(Filename: C:/buildslave/unity/build/Runtime/Allocator/MemoryManager.cpp Line: 980)

Exit with error code: 2

========== OUTPUTING STACK TRACE ==================



========== END OF STACKTRACE ===========

Could not allocate memory: System out of memory!
Trying to allocate: 2273536B with 16 alignment. MemoryLabel: TempJobAlloc
Allocation happend at: Line:379 in    C:\buildslave\unity\build\Runtime/Utilities/dynamic_array.h

我在屏幕上打印:Profiler.GetTotalAllocatedMemory()、Profiler.GetTotalReservedMemory()、Profiler.GetTotalAllocatedMemory()、unusedReservedMemory = Profiler.GetTotalUnusedReservedMemory()、unusedReservedMemory not null 当应用程序退出时出错。应用程序未响应http://prntscr.com/adf9of时的屏幕截图。

4

0 回答 0