In hypercube computers that support a multiuser environment, it is important for the operating system to be able to allocate subcubes of different dimensions. Previously proposed subcube allocation schemes, such as the buddy strategy, can fragment the hypercube excessively. We present a precise characterization of the subcube allocation problem and develop a general methodology to solve it. New subcube allocation and coalescing algorithms are described that have the goal of minimizing fragmentation. The concept of a maximal set of subcubes (MSS), which is useful in making allocations that result in a tightly packed hypercube, is introduced. The problems of allocating subcubes and of forming an MSS are formulated as decision problems, and shown to be NP-hard. We prove analytically that the buddy strategy is optimal under restricted conditions, and then show using simulation that its performance is actually poor under more realistic conditions. We suggest a heuristic procedure for efficiently coalescing a released cube with the existing free cubes. This coalescing approach is coupled with a simple best-fit allocation scheme to form the basis of a class of MSS-based strategies that give a substantial performance (hit ratio) improvement over the buddy strategy. Finally, we present simulation results comparing several different allocation and coalescing strategies, which show that our MSS-based schemes provide a marked performance improvement over previous techniques.