From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lockywolf Newsgroups: gmane.emacs.help Subject: Re: Emacs on Android OOMs with pdf-tools. (And an Android howto.) Date: Thu, 22 Aug 2024 08:50:42 +0800 Message-ID: <8734mxxtwd.fsf@laptop.lockywolf.net> References: <87r0ajfikz.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7204"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.10.7; emacs 30.0.50 To: help-gnu-emacs@gnu.org, monnier@iro.umontreal.ca, luangruo@yahoo.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 22 02:52:36 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sgw44-0001lu-BK for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 22 Aug 2024 02:52:36 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sgw3L-0008A2-Ed; Wed, 21 Aug 2024 20:51:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sgw3G-00089f-QB for help-gnu-emacs@gnu.org; Wed, 21 Aug 2024 20:51:46 -0400 Original-Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sgw3E-0005nT-L2 for help-gnu-emacs@gnu.org; Wed, 21 Aug 2024 20:51:46 -0400 Original-Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-a7aabb71bb2so34923266b.2 for ; Wed, 21 Aug 2024 17:51:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724287901; x=1724892701; darn=gnu.org; h=mime-version:message-id:date:in-reply-to:subject:to:from:user-agent :from:to:cc:subject:date:message-id:reply-to; bh=3FMJzxSU1mh9U7flaf+JLGAiHoAYmPbfZ3mYD/Uf7kI=; b=JTJBO+IEzGN+Ks55MGT4HerYMJkhihfEBnmfstptFa11v+v8OmiYZqEutHTdgvYdN9 ldvSsH/dFPTsM8ScgWNfa9JR1tZORSRutc0Vtqu1jjf9UObTPCKFgbLtS/GDs8FK0uPB IVoG8AkaYDao5DvL90ZAucMk47Eja8bh8sDHABuxBeWGJ0uN1zf2PBiLJ7Srp7XhfQll UFYjeVH4xtEFhsM+K8GxitKuEjiziFvXoEAYXjQVAuDR/ZssbGQRQ/2ctGStZL4MNp2n Se2RgPQhfj4x1iZbBHLLqqS3pY6MF34HpE677URG6Aw9pnAsOQnsCEYFiEdgfFLEjVbZ oMfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724287901; x=1724892701; h=mime-version:message-id:date:in-reply-to:subject:to:from:user-agent :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3FMJzxSU1mh9U7flaf+JLGAiHoAYmPbfZ3mYD/Uf7kI=; b=O8lgxx/Ap7uaq8aTuhMwaLd8oHU14sj7UJ7MZLM/AJ+1yEgx544Rvqx5t6Vwa0jQUw yfbOPb6qEO95skVwnfD0E6leHXkTmszTgM/bDddZUAfTxrYwtRKpCeYbrbgRGiqo8E+B kot4cAFdrYRmzJltaUjD/lLotnuUq54kpEnwYKvdlWFxUBlJ0HhbuseFk5Kd6GvGg/5M 8DTFmPyKgyo8aG3Eq28sGqoPjewcIaL8natly3vwDOJSMFKTU8R/kyFVrjTuHvRDrXL7 cKQibe4KSZR5EAziYdvwRk8d2ZcqKMTQQ4Y9MhaaoloYChol3OemzHHbl08dwJUuve1/ Fu3Q== X-Gm-Message-State: AOJu0Yzkd2ZfoeceBAAKljmy4voxPsDDRnkOaNm3Sk66eTUEGg+NsvK6 dOD+f+IMUflt9wFGuvH9tuii/Zh7Ms3AWWQuGpoBkKMO+WRxve39 X-Google-Smtp-Source: AGHT+IETtJiomF9aUWhzsSKyqmeY1jlt08aWK42krmJ+hWrfr0JKvGa6ccqY3LEp88LmTPe8K9/s0Q== X-Received: by 2002:a17:907:8694:b0:a7a:abd8:77a5 with SMTP id a640c23a62f3a-a866f8f46bfmr352210566b.43.1724287900687; Wed, 21 Aug 2024 17:51:40 -0700 (PDT) Original-Received: from laptop.lockywolf.net ([2001:470:24:315::102]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a868f48a9absm33031866b.181.2024.08.21.17.50.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 17:51:40 -0700 (PDT) In-Reply-To: <87r0ajfikz.fsf@yahoo.com>, Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=lockywolf@gmail.com; helo=mail-ej1-x634.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:147747 Archived-At: Date: Thu, 22 Aug 2024 08:12:44 +0800 Thanks everyone for the memory-report command, I hadn't known about it before this case. >How much memory does your device provide? The device has 2 Gb of RAM, of which about 1.5 Gb are ordinarily used by the system and built-in annoyances. I am trying to _only_ use Emacs on this device, so it should have about 500 Mb left. But I am pretty sure it is not actually the problem of not enough memory, as memory-report is clearly showing that something is wrong. The two reports, before and after the OOM message, are below. The concerning bit seems to be: "256 MiB Total Image Cache Size" 256 Mb is a significant number for this device. Below I am also pasting memory-report with doc-view-mode, which seems to "only" generate 160 Mb of image-cache. Is it possible to tell Emacs to not generate so much cache? * Before Estimated Emacs Memory Usage 5 MiB Overall Object Memory Usage 2.3 MiB Memory Used By Global Variables 1.1 MiB Memory Used By Symbol Plists 451 KiB Total Image Cache Size 237 KiB Reserved (But Unused) Object Memory 36 KiB Total Buffer Memory Usage Object Storage 2.2 MiB Strings 1.2 MiB Conses 1.2 MiB Vectors 374 KiB Symbols 6 KiB Intervals 5 KiB Buffer-Objects 1.1 KiB Floats Largest Buffers 11 KiB andrei 9.6 KiB *scratch* 6.1 KiB *Messages* 2.4 KiB *Minibuf-1* 2.1 KiB *code-conversion-work* 2.1 KiB *Echo Area 0* 2.1 KiB *Echo Area 1* 203 B *Memory Report* 173 B *Minibuf-0* Largest Variables 356 KiB package-archive-contents 319 KiB load-history 115 KiB definition-prefixes 107 KiB easy-menu-converted-items-table 79 KiB org-entities 64 KiB widget-global-map 64 KiB help-quick-use-map 64 KiB global-map 60 KiB face--new-frame-defaults 55 KiB input-method-alist 51 KiB package--builtins 47 KiB coding-system-alist 41 KiB language-info-alist 41 KiB color-name-rgb-alist 25 KiB menu-bar-options-menu 24 KiB x-colors 22 KiB key-translation-map 21 KiB org-mode-map 20 KiB package--compatibility-table 19 KiB minor-mode-map-alist * After Estimated Emacs Memory Usage 256 MiB Total Image Cache Size 9.2 MiB Overall Object Memory Usage 2.7 MiB Memory Used By Global Variables 1.3 MiB Memory Used By Symbol Plists 803 KiB Total Buffer Memory Usage 245 KiB Reserved (But Unused) Object Memory Object Storage 4.7 MiB Strings 2.3 MiB Vectors 1.7 MiB Conses 485 KiB Symbols 12 KiB Floats 10 KiB Intervals 8.9 KiB Buffer-Objects Largest Buffers 744 KiB mutual-information-Romaschenko_1710.05984.pdf 14 KiB memory-report-before-pdf-tools.txt 11 KiB andrei 9.6 KiB *scratch* 6.1 KiB *Messages* 2.4 KiB *Minibuf-1* 2.2 KiB *eldoc for major-mode* 2.1 KiB *Echo Area 0* 2.1 KiB *pdf-info-query--escape* 2.1 KiB *code-conversion-work* 2.1 KiB *Echo Area 1* 2.1 KiB tq-temp-epdfinfo 2.1 KiB *pdf-info-query--parse-response* 203 B *Memory Report* 173 B *Minibuf-0* 96 B *epdfinfo* Largest Variables 369 KiB load-history 356 KiB package-archive-contents 148 KiB easy-menu-converted-items-table 115 KiB definition-prefixes 102 KiB minor-mode-map-alist 79 KiB org-entities 68 KiB face--new-frame-defaults 64 KiB tablist-edit-column-minor-mode-map 64 KiB widget-global-map 64 KiB help-quick-use-map 64 KiB global-map 55 KiB input-method-alist 51 KiB package--builtins 47 KiB coding-system-alist 41 KiB language-info-alist 41 KiB color-name-rgb-alist 27 KiB custom-face-all 25 KiB menu-bar-options-menu 24 KiB x-colors 22 KiB key-translation-map * doc-view-mode Estimated Emacs Memory Usage 160 MiB Total Image Cache Size 6 MiB Overall Object Memory Usage 2.3 MiB Memory Used By Global Variables 1.1 MiB Memory Used By Symbol Plists 568 KiB Total Buffer Memory Usage 361 KiB Reserved (But Unused) Object Memory Object Storage 2.3 MiB Strings 2.1 MiB Vectors 1.2 MiB Conses 384 KiB Symbols 6.4 KiB Intervals 5.5 KiB Buffer-Objects 1.4 KiB Floats Largest Buffers 531 KiB mutual-information-Romaschenko_1710.05984.pdf 12 KiB andrei 9.8 KiB *scratch* 6.1 KiB *Messages* 2.4 KiB *Minibuf-1* 2.1 KiB *code-conversion-work* 2.1 KiB *Echo Area 0* 2.1 KiB *Echo Area 1* 203 B *Memory Report* 173 B *Minibuf-0* Largest Variables 356 KiB package-archive-contents 323 KiB load-history 119 KiB easy-menu-converted-items-table 115 KiB definition-prefixes 79 KiB org-entities 64 KiB widget-global-map 64 KiB help-quick-use-map 64 KiB global-map 60 KiB face--new-frame-defaults 55 KiB input-method-alist 51 KiB package--builtins 47 KiB coding-system-alist 41 KiB language-info-alist 41 KiB color-name-rgb-alist 25 KiB menu-bar-options-menu 24 KiB x-colors 22 KiB key-translation-map 21 KiB org-mode-map 20 KiB package--compatibility-table 20 KiB minor-mode-map-alist -- Your sincerely, Vladimir Nikishkin (MiEr, lockywolf) (Laptop)