Home / Function/ normalizeSize() — netty Function Reference

normalizeSize() — netty Function Reference

Architecture documentation for the normalizeSize() function in SizeClasses.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  609aee86_f632_78ca_7fdb_811f683fed92["normalizeSize()"]
  d1cbce7b_bd0a_5553_8e62_6deeb38137ff["SizeClasses"]
  609aee86_f632_78ca_7fdb_811f683fed92 -->|defined in| d1cbce7b_bd0a_5553_8e62_6deeb38137ff
  e527e111_d931_4c43_c84e_902b0e4264cf["alignSizeIfNeeded()"]
  609aee86_f632_78ca_7fdb_811f683fed92 -->|calls| e527e111_d931_4c43_c84e_902b0e4264cf
  a562ee20_4cc3_ab6b_7ce7_4f6aadf67eb4["normalizeSizeCompute()"]
  609aee86_f632_78ca_7fdb_811f683fed92 -->|calls| a562ee20_4cc3_ab6b_7ce7_4f6aadf67eb4
  style 609aee86_f632_78ca_7fdb_811f683fed92 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buffer/src/main/java/io/netty/buffer/SizeClasses.java lines 391–403

    @Override
    public int normalizeSize(int size) {
        if (size == 0) {
            return sizeIdx2sizeTab[0];
        }
        size = alignSizeIfNeeded(size, directMemoryCacheAlignment);
        if (size <= lookupMaxSize) {
            int ret = sizeIdx2sizeTab[size2idxTab[size - 1 >> LOG2_QUANTUM]];
            assert ret == normalizeSizeCompute(size);
            return ret;
        }
        return normalizeSizeCompute(size);
    }

Domain

Subdomains

Frequently Asked Questions

What does normalizeSize() do?
normalizeSize() is a function in the netty codebase, defined in buffer/src/main/java/io/netty/buffer/SizeClasses.java.
Where is normalizeSize() defined?
normalizeSize() is defined in buffer/src/main/java/io/netty/buffer/SizeClasses.java at line 391.
What does normalizeSize() call?
normalizeSize() calls 2 function(s): alignSizeIfNeeded, normalizeSizeCompute.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free