I am very sorry,
i struggle with the OOM crash actually read the solutions but dont get sure about before and after!
like the example from here
is it before (i found) Source technic_worldgen/oregen.lua:
changed again and now this 2 lines like shown ... miss understand first, but wondering why "data" instead of "sulfur_buf"
got now better understand and changed, not tested yet.
3 Memory use optimisations for Lua mapgens
- Festus1965
- Member
- Posts: 4181
- Joined: Sun Jan 03, 2016 11:58
- GitHub: Festus1965
- In-game: Festus1965 Thomas Thailand Explorer
- Location: Thailand ChiangMai
- Contact:
Re: 3 Memory use optimisations for Lua mapgens
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)
If urgend, you find me in Roblox (as CNXThomas)
- BuckarooBanzay
- Member
- Posts: 437
- Joined: Tue Apr 24, 2018 05:58
- GitHub: BuckarooBanzay
- IRC: BuckarooBanzai
- In-game: BuckarooBanzai
Re: 3 Memory use optimisations for Lua mapgens
@paramat am i doing this right?: https://github.com/minetest-mods/technic/pull/484/files
-
- Member
- Posts: 41
- Joined: Sat Oct 21, 2017 18:12
- In-game: Kurtzmusch
Re: 3 Memory use optimisations for Lua mapgens
what happens when you try to recycle the buffers but the engine is set to generate maps with more than 1 emerge threads? should i make a buffer per thread or will the c++ threads take turns in calling my on_generated? sofar once said that lua is single-threaded, but isnt it possible for the engine to spawn 2 lua instances? if the threads do take turns to call on_generated doesnt this mean that a lua mapgen will be 2 to 4 times slower?( considering that most processors are duo or quad core)
Like Puzzles? Escape The Dungeon
-
- Moderator
- Posts: 4095
- Joined: Wed Aug 24, 2011 09:44
- GitHub: sfan5
- IRC: sfan5
- Location: Germany
Re: 3 Memory use optimisations for Lua mapgens
Nothing, your Lua code does not have to concern itself with this.Kurtzmusch wrote:what happens when you try to recycle the buffers but the engine is set to generate maps with more than 1 emerge threads? [...]
That's a weird way to put it, but it's technically true since Lua is single-threaded.Kurtzmusch wrote:if the threads do take turns to call on_generated doesnt this mean that a lua mapgen will be 2 to 4 times slower?( considering that most processors are duo or quad core)
Who is online
Users browsing this forum: No registered users and 0 guests