Memory segments are allocated for a classloader to store class
information, such as by selecting an allocation approach based on
classloader type. In a first approach, in response to each request, a
segment having a fixed size is allocated. In a second approach, in
response to a first request, a first segment having a size equal to an
amount of memory needed to store information related to the request is
allocated. In response to a second request, a second segment having a
second size is allocated, and in response to a third request, a third
segment having a third size greater than the second size is allocated. In
a third approach, in response to the first request, a first segment
having a first size is allocated. In response to a second request, a
second segment having a second size greater than the first size is
allocated.