Yes, and IMHO we should not be doing it in C anyhow.  The replacement policy already does this.