Memory Allocation Error Block Too Big
AddOn HELP! Addon causing memory allocation error: block too big Register FAQ Members List Calendar Today's Posts Search AddOn HELP! Requests for assistance and misc bug reports go here. Search Forums Show Threads Show Posts Tag Search Advanced Search Go to Page... Page 1 of 2 1 2 > Thread Tools 10-19-2008 #1 Olib Newbie Join Date: Sep 2008 Posts: 8 Addon causing memory allocation error: block too big Since Friday/Saturday I've been receiving "Memory Allocation Error: Block too big" during prolonged raiding (1-3 hours). I nuked my UI in 3.0 and started rebuilding it, though unfortunatly I wasn't able to find updated mods for everything so in places I am running out of date mods. I raided on thursday without a problem and first noticed this problem yesterday (Saturday) and again today. I'm on Vista and have the Curse client auto updating addons. As I'm sure most of you are aware, this problem consists of what can only be called an entire UI break down - mods that are already open continue to work - sort of (i.e. I can click on grid for example, but my quartz cast bar will cease to work and just gets locked at whatever it was doing when the error occured). I've been reading up as much as I can about what may be the cause, checking pages and forum threads relating to mods - I came across a forum thread or two on the official forums that basically pointed the finger at cowtip but I've been using cowtip for a year without a problem (though I nuked my UI I did reinstall many of the same mods and basically rebuilt it so it looked the same). The thing I find most off putting is that I can't find anyone else still experiencing this problem except a guildie thats using my UI. A few screenies: bugsack open just after errors occured: http://img529.imageshack.us/my.php?i...8210405tk3.jpg Performancefu showing the memory hogging isn't being attributed to anything: http://img530.imageshack.us/my.php?i...8210604nk7.jpg Screeny of addons folder: http://img183.imageshack.us/my.php?image=mymodsje5.jpg So my question is - does anyone know which mods are likely / known to still be causing the problem? If so is it something that can be fixed the threads I was reading made it sound like there wasn't a fix as it was just the way the game was (which as I say seems odd as I have been using most of these mods for a year). Thanks in advan
LUA_CORE #include "lua.h" #include "ldebug.h" #include "ldo.h" #include "lmem.h" #include "lobject.h" #include "lstate.h" /* ** About the realloc function: ** void * frealloc (void *ud, void *ptr, size_t osize, size_t nsize); ** (`osize' is the old size, `nsize' is the new size) ** ** Lua ensures that (ptr == NULL) iff (osize == 0). ** ** * frealloc(ud, NULL, 0, x) creates a new block of size `x' ** ** * frealloc(ud, p, x, 0) frees the block `p' ** (in this https://forums.curseforge.com/showthread.php?t=14666 specific case, frealloc must return NULL). ** particularly, frealloc(ud, NULL, 0, 0) does nothing ** (which is equivalent to free(NULL) in ANSI C) ** ** frealloc returns NULL if it cannot create or reallocate the area ** (any reallocation to an equal or smaller size cannot fail!) */ #define MINSIZEARRAY 4 void *luaM_growaux_ (lua_State *L, void *block, int *size, https://www.lua.org/source/5.1/lmem.c.html size_t size_elems, int limit, const char *errormsg) { void *newblock; int newsize; if (*size >= limit/2) { /* cannot double it? */ if (*size >= limit) /* cannot grow even a little? */ luaG_runerror(L, errormsg); newsize = limit; /* still have at least one free place */ } else { newsize = (*size)*2; if (newsize < MINSIZEARRAY) newsize = MINSIZEARRAY; /* minimum size */ } newblock = luaM_reallocv(L, block, *size, newsize, size_elems); *size = newsize; /* update only when everything else is OK */ return newblock; } void *luaM_toobig (lua_State *L) { luaG_runerror(L, "memory allocation error: block too big"); return NULL; /* to avoid warnings */ } /* ** generic allocation routine. */ void *luaM_realloc_ (lua_State *L, void *block, size_t osize, size_t nsize) { global_State *g = G(L); lua_assert((osize == 0) == (block == NULL)); block = (*g->frealloc)(g->ud, block, osize, nsize); if (block == NULL && nsize > 0) luaD_throw(L, LUA_ERRMEM); lua_assert((nsize == 0) == (block == NULL)); g->totalbytes = (g->totalbytes - osize) + nsize; return block; } Last update: Sat Mar 5 09:19:55 2016
The Same: 2. Raid for 2-3 hrs system will crash, with the message printed below. http://www.wowace.com/addons/cowtip/tickets/1-memory-allocation-error-block-too-big/ Windows "Ding"Error sound comes up und wow quits instantly. EVERY DAY I AM RAIDING AFTER 2 OR 3 Hours. 3. After loging in you can raid http://stackoverflow.com/questions/29806478/reallocating-resizing-lua-5-1-userdata-in-c for new 2-3 hours then the error comes again. I get this error up to 8times a week and last time it crashes by 15% memory allocation of bossfight - login - no loot for me -.-. Disabled cowtip and no errors in raiding. But i love your addon so please fix it! Try to google this error message ive printed below, there are many forum posters that all say cowtip is the cause. What is the expected memory allocation error output? What do you see instead? Nothing. Error and then wow quits. What version of the product are you using? Always the Newest. Do you have an error log of what happened? YES: "Date: 2008-09-01 22:32:54 ID: 54 Error occured in: Global Count: 1 Message: memory allocation error: block too big Debug: [C]: ? [C]: GetRegions() CowTip\Appearance\Appearance.lua:382 SetFont() CowTip\Appearance\Appearance.lua:263 CowTip\Appearance\Appearance.lua:258 [C]: SetInventoryItem() TBag\TBag.lua:2129 TBag_MakeToolTipStr() TBag\TBag.lua:2707 TBag_ScanEquipped() TBag\TInv.lua:368 TInv_OnEvent() [string "*:OnEvent"]:24: [string "*:OnEvent"]:1 AddOns: ACP, v2.4.3.$Revision: 80453 $ AdvancedTradeSkillWindow Aloft, vr69497 AloftPresets Atlas, v1.12.0 AtlasBattlegrounds, v1.12.0 AtlasDungeonLocs, v1.12.0 AtlasFlightPaths, v1.12.0 AtlasOutdoorRaids, v1.12.0 AtlasLoot, vAtlasLoot Enhanced v4.06.03 AtlasLootBCInstances, v4.06.03 AtlasQuest, vAtlasQuest 4.1.2 AuldLangSyne, vr71502 AutoEmote AutoProfitX, v2.03 AutoShoutOut, v1.15.8 AutoTurnin, v3.0.6 BanzaiAlert, v1 BasicMinimap, v1.0 BigBrother BigWigs, v2.0 r79982 Bongos, v1.3 BongosAB, v2.1 BongosOptions BongosRoll BongosStats Bongos3ButtonFacade ButtonFacade, v0.1Alpha ButtonFacadeDreamZoom ButtonFacadeApathy, v2.4.2 ButtonFacadeCaith, v2.4.2 ButtonFacadeEntropy, v2.4.2 ButtonFacadeGears, v2.4.2 ButtonFacadeLayerTest, v2.4.2 Bu
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Reallocating/resizing Lua 5.1 userdata in C up vote 2 down vote favorite How do you resize a Lua 5.1 userdata object in C during runtime? I would like to change the size of the NumArray structure described in Roberto Ierusalimschy's book Programming in Lua, 2nd edition, pp. 260, from the Lua 5.1 console. My NumArray userdata can either store unsigned chars or lua_Numbers. I played around with calling the unmodified luaM_realloc_ function defined in lmem.c, but finally any call to C's realloc (via l_alloc) function just returns NULL, so I get a not enough memory error message. Would somebody please help me ? --- lapi.c ------------------------------------------------------------------------------------------------- LUA_API void *agn_resizeud (lua_State *L, void *block, size_t osize, size_t nsize) { Udata *u = (Udata *)luaM_realloc_(L, block, osize + sizeof(Udata), nsize + sizeof(Udata)); u->uv.len = nsize; if (u == NULL) luaL_error(L, "Error in " LUA_QS ": failed to allocate memory.", "API/agn_resizeud"); return u; } --- numarray.c --------------------------------------------------------------------------------------------- #define checkarray(L, n) (NumArray *)luaL_checkudata(L, n, "numarray") [...] /* Auxiliary C function to finally call luaM_realloc_ via the Lua C API */ void *reallocud (lua_State *L, void *block, size_t o, size_t n, size_t sizeofelem, size_t sizeofnumarray) { if (n + 1 > MAX_SIZET/sizeofelem) luaL_error(L, "Error in " LUA_QS ": memory allocation error: block too big.", "(reallocud)", n); else return agn_resizeud(L, block, sizeofnumarray + o*sizeofelem, sizeofnumarray + n*sizeofelem); } /* function to resize a NumArray */ static int numarray_resize (lua_State *L) { size_t i; global_State *g = G(L); NumArray *a = checkarray(L, 1); int n = luaL_checkinteger(L, 2); if (n < 1) luaL_error(L, "Error in " LUA_QS ": new size %d is non-positive.", "numarray.resize", n); if (n == a->size) { /* do nothing and do not complain */ lua_pushinteger(L, a->size); return 1; } if (n > a->size) { /* extend */ a = reallocud(L, a, a->size, n, a->isnumber ? sizeof(lua_Number) : siz