TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Easily Calculate Memory from Bytes to KB, MB, GB, TB

4 pointsby im_coderover 1 year ago

3 comments

dustedover 1 year ago
I don&#x27;t understand this.. What&#x27;s this trying to tell ?<p>If I need to calculate the approximate memory required for 42652 records of 46 bytes, I&#x27;d just multiply them? So that&#x27;d be 1961992 bytes, if I wanted to know how many kibibytes it was, I&#x27;d divide by 1024 and that&#x27;d be 1916, or roughly 1,9 mib ?<p>If I needed giant numbers and knew my result be in the gigabyte range, I&#x27;d just divide by 1024^3
评论 #38204578 未加载
beardywover 1 year ago
<a href="https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Teaching_grandmother_to_suck_eggs" rel="nofollow noreferrer">https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Teaching_grandmother_to_suck...</a><p>Teaching grandmother to suck eggs
im_coderover 1 year ago
The Back-of-the-envelope calculation to calculate memory size. A helpful trick for the next System Design Interview