--- zzzz-none-000/linux-2.6.39.4/fs/proc/mmu.c 2011-08-03 19:43:28.000000000 +0000 +++ puma6-arm-6490-729/linux-2.6.39.4/fs/proc/mmu.c 2021-11-10 13:23:10.000000000 +0000 @@ -42,7 +42,10 @@ continue; if (addr >= VMALLOC_END) break; - +#if defined(CONFIG_AVM_ENHANCED) + /*--- no ioremap and so on ... ---*/ + if(vma->flags & VM_ALLOC) +#endif/*--- #if defined(CONFIG_AVM_ENHANCED) ---*/ vmi->used += vma->size; free_area_size = addr - prev_end; @@ -58,3 +61,16 @@ read_unlock(&vmlist_lock); } } +#if defined(CONFIG_AVM_ENHANCED) +/*--------------------------------------------------------------------------------*\ +\*--------------------------------------------------------------------------------*/ +unsigned int get_used_vmalloc_mem(void) { + struct vmalloc_info vmi; + unsigned long flags; + + local_irq_save(flags); + get_vmalloc_info(&vmi); + local_irq_restore(flags); + return vmi.used; +} +#endif/*--- #if defined(CONFIG_AVM_ENHANCED) ---*/