summaryrefslogtreecommitdiff
path: root/psi/ireclaim.c
diff options
context:
space:
mode:
Diffstat (limited to 'psi/ireclaim.c')
-rw-r--r--psi/ireclaim.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/psi/ireclaim.c b/psi/ireclaim.c
index c48c3d1f3..8a3aedc81 100644
--- a/psi/ireclaim.c
+++ b/psi/ireclaim.c
@@ -141,7 +141,9 @@ gs_vmreclaim(gs_dual_memory_t *dmem, bool global)
) {
gs_ref_memory_t *mem = dmem->spaces_indexed[i];
- if (mem == 0 || (i > 0 && mem == dmem->spaces_indexed[i - 1]))
+ /* Always safe to substract 1 from i here, as i is always at
+ * least i_vm_system (1) or i_vm_local (2). */
+ if (mem == 0 || (mem == dmem->spaces_indexed[i - 1]))
continue;
if (mem->stable_memory != (gs_memory_t *)mem)
ialloc_gc_prepare((gs_ref_memory_t *)mem->stable_memory);