It is kibibytes (1024), those are raw interfaces to the getrusage()/ setrlimit() APIs. Those documentations are inaccurate (or old-school as you say).
Also note that the resource limits/accountings and their units vary between systems, you'll find that it's not uncommon for shells to get it wrong on some systems (don't behave as documented). You'll find some additional scaling done by some shells to accommodate that or to be compatible with the original implementation in BSD csh, but in any case, the KMGTPE suffixes where supported are always 1024 based, not 1000 based.
It reminds me I have a proposed patch for zsh covering that and more that I need to finalise.
You'll see the code in there clearly states the unit for each resource.
typedef struct resinfo_T {
int res; /* RLIMIT_XXX */
char* name; /* used by limit builtin */
enum zlimtype type;
int unit; /* 1, 512, or 1024 */
char opt; /* option character */
char* descr; /* used by ulimit builtin */
} resinfo_T;
[...]
{RLIMIT_RSS, "resident", ZLIMTYPE_MEMORY, 1024,
'm', "resident set size (kbytes)"},
For the RSS limit.
Also beware the unit for %M with zsh's time keyword is wrong on all systems but Darwin/macos.
The standalone GNU time utility (many shells have their own time as a keyword), knows about the different units between Darwin/macOS and other systems.