Skip to content

Commit

Permalink
lib: add warning to MemoryUsage for external objects
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin authored and ChrisJefferson committed Jan 13, 2017
1 parent 1674aec commit 1cb0208
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/memusage.gi
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ InstallMethod( MemoryUsage, "generic fallback method",
mem := mem + MemoryUsage(s);
fi;
od;
elif TNUM_OBJ_INT(o) >= FIRST_EXTERNAL_TNUM then
# Since we are in the fallback method, clearly there is no
# MemoryUsage method installed for the given object.
Info(InfoWarning, 1, "No MemoryUsage method installed for ",
TNUM_OBJ(o)[2],
", reported usage may be too low" );
fi;
MU_Finalize();
return mem;
Expand Down

0 comments on commit 1cb0208

Please sign in to comment.