This paper describes an analysis technique to reduce the cost in processing time of the storage management operations implied by a program (possibly to zero). The goal of the compile-time optimizations is to replace as much as possible the allocation of new cells by the reuse of previously deallocated cells (in place updating). The technique is based on the detection of sharing information. We present several abstract interpretations on a domain of list patterns allowing to detect sharing information and necessity information; then we show how the infinite domain of patterns can be mapped onto a finite domain in order to achieve the analysis at compile-time. These pieces of information are then used to improve the reference counting semantics associated with particular programs. We illustrate the method developed in this paper with the na’ive reverse example and we show that all the cell allocations involved in this program can be implemented as in place updating.